Hafiz Abu Samee'ah
Benefit:
Raw garlic, raw onion, as well as any foul-smelling item such as radish, wild leek (gandana), and cigarettes, hookah, etc., are prohibited to be used before coming to the mosque, because mosques are the gathering places of angels, and angels have a strong aversion to foul odors. Furthermore, worshippers are also harmed by their smell. [صحيح مسلم: 584]
Therefore, one should avoid these things as a general practice as well. However, if they are cooked (or their odor is completely removed by some other means), then it is permissible to eat them. [ابو داود: 3827، اس كي سند صحيح هے]
Source: Muwatta Imam Malik by Abu Samia Mahmood Tabassum, Page: 29