The foul smell helps to attract insects that help disperse the spores. Chemicals that contribute to the odor include methylmercaptan and hydrogen sulfide.
The unpleasant aroma encourages insect activity that promotes spore distribution. Components of the smell include methylmercaptan and hydrogen sulfide.