The Prophet Rescued from Eating Garlic and Onions

What kid likes vegetables?  Especially when it comes to garlic and onions.  They have a strong flavor and they don’t have the best of smells.

“The Prophet (ﷺ) said, “Whoever eats garlic or onion should keep away from our mosque or should remain in his house.” (Jabir bin `Abdullah, in another narration said, “Once a big pot containing cooked vegetables was brought. On finding unpleasant smell coming from it, the Prophet (ﷺ) asked, ‘What is in it?’ He was told all the names of the vegetables that were in it.
The Prophet (ﷺ) ordered that it should be brought near to some of his companions who were with him. When the Prophet (ﷺ) saw it he disliked to eat it and said, ‘Eat. (I don’t eat) for I converse with those whom you don’t converse with (i.e. the angels)” (Sahih al-Bukhari 855).

This implied several things.  Angelic spiritual beings have a strong sense of smell, they cannot be around certain foods that people eat, and if someone does eat such foods, it makes it difficult to converse with them.  Therefore special people should be exempt from eating things like garlic and onions because of the angels.   Or was it that this was a revelation getting him out of something he didn’t like?