Mary Roach said this quote

Animals' taste systems are specialized for the niche they occupy in the environment. That includes us. As hunters and foragers of the dry savannah, our earliest forebears evolved a taste for important but scarce nutrients: salt and high-energy fats and sugars. That, in a nutshell, explains the widespread popularity of junk food.