Not entirely correct.
The basic goals of a sentient creatures are to:
Absorb nutrients
Avoid pain
Experience pleasure
in that order.
Humans have evolved in a way that allows them to, in some circumstances easily or effortlessly obtain nutrients to the point that it has lost it's presence as a first priority. Avoiding pain as become much easier and there are no natural predators of the modern humans. This leaves experiencing pleasure at the number one priority in short term time frames experienced in day to day life. One example being the consumption of unhealthy foods that are less beneficial to the body over available balanced nutrients. While we are still consuming nutrients our wellbeing is being valued less than that of a pleasurable experience (the flavors presented in the food).
Because we do not, on a day to day basis, need to be concerned with our nutrient intake or avoiding pain in a way that promotes our survival, we have achieved a state where it is not illogical to value pleasure over other essential needs. They no longer directly affect our ability to survive.