Without belaboring the fact, food is just a mixture of chemicals. The pleasant fruity odor from some foods is often due to the presence of a class of organic compounds called esters. For example, ethyl butyrate gives the scent of pineapple and octyl acetate gives the smell of oranges.