Sterols, essential lipids of most eukaryotic cells, ensure important structural and signaling functions. The selection pressure that has led to different dominant sterols in the three eukaryotic kingdoms remains unknown. Here, we investigated the influence of the progression in the different steps of the ergosterol biosynthetic pathway (EBP) on the yeast resistance to transitions from aqueous to aerial media, typical perturbations of the higher fungi habitats. Five mutants of the EBP (ergΔ), accumulating different sterol intermediates in the EBP, and the wild-type (WT) strain were exposed to drying under atmospheric air or nitrogen and wetting. Results show that the progression in the EBP parallels an increase in the yeast resistance to air-drying with a maximal survival rate for the WT strain. When drying/wetting was performed under nitrogen, yeast survival was higher, particularly for the earlier mutants of the EBP. Thus, ergosterol, through its protective role against mechanical and oxidative stress, might have been selected by the pressure induced by drying/wetting cycles occurring in the fungi habitats. These results support the Bloch hypothesis, which postulates that the properties of sterols are gradually optimized for function along the biosynthetic pathway and provide a response to the enduring question “why ergosterol in fungi?”.