During Samudra Manthana, Amrita was distributed to Devas by Mohini, who is an avatar of Lord Vishnu. However, the demon Rahu gets to drink Amrita by deceit. Surya and Chandra recognise Rahu and alert Mohini. The question is why didn't Mohini recognise Rahu? If She knew that Rahu is getting Amrita by deceit, why did She give it to him?
Swami Prabhupada provides answer to this in his commentary on ŚB 8.9.24:
Here one may ask why the Supreme Personality of Godhead could not detect Rāhu. The reason is that the Lord wanted to show the effects of drinking nectar.
In the commentary of next verse, he mentions
Rāhu had been drinking nectar through his mouth, and before the nectar entered his body, his head was cut off. Thus Rāhu’s head remained alive whereas the body died. This wonderful act performed by the Lord was meant to show that nectar is miraculous ambrosia.
The same thing is mentioned in the book Stowies By Satsvarūpa Dāsa Gosvāmī: Stowie 24 (Page 83).