Why do people like the smell after the rain?
The smell of rain has a term - petrikor.
When rain falls on the ground, water gets into microcracks and pores. The air in them forms bubbles on a wet surface, which, bursting, throw many microdroplets into the air.
These tiny particles, containing oils of vegetable origin, are picked up by air currents and carried around, creating the very unique and loved by many aroma.
For the same reason, by the way, when it rains, a huge number of soil bacteria are in the air. So when you say you smell wet soil, it's actually a molecule that is produced by a certain type of bacteria. This molecule, geosmin, is produced by Streptomyces bacteria.
Geosmin is one of the most common ingredients in perfumery today. Even when you dilute it to a few parts per billion, people still feel it.