Food that smells good attracts us when we are hungry and makes eating pleasant so that we will be inclined to sustain our bodies. Smell can also warn us of air that might be dangerous to breathe. The fragrance of flowers attracts insects for pollination and is a bonus for us. Humans use perfumes to mask unpleasant body odors and for sexual allurement. The smell of body odors can tell us of the release of toxins we have somehow taken into our system, and they also urge us to clean our bodies for hygienic reasons.
Taste is even more specifically related to eating than smell.
The primary tastes are salt, sweet, sour, and bitter. Bitter and to some extent sour tend to warn us of foods that may not be healthy for us, especially in large amounts. Salt and sweet help to provide and regulate the amounts of salt and sugars the body requires. Both are needed, but our taste sense can also tell us when we are getting too much. Taste, of course, also gives pleasure to eating, which is especially urged and enhanced when we are hungry.