Why do many people seem to prefer unhealthy compared to healthy foods?
It's a very simple answer. &quot;Unhealthy&quot; foods, for example potato chips, sugary drinks, and other fatty, cheesy or sugary edible items, have only been around a few hundred (at most) years. In prehistoric times (before agriculture, when the primary source of food was hunting and gathering), when food was scarce, fatty and sugary foods would be of great importance. They would supply the body with large quantities of energy (a gramme of fat gives about 9 calories, a gramme of carbs gives around 4 calories). Since we survived mostly on fruits, vegetables, meat, and whatever roots we could find, something as energy rich as, say, a serving of deep fried cheese covered bacon would have sustained us for days. So eating anything with high calorific value, like a fat rich tuber would release 'feel-good' chemicals, like dopamine and serotonin, among others, which make us feel happy (dopamine is also released in response to hugs and accomplishing goals, serotonin is released, in very large quantities, during nicotine consumption).
Our body these days just isn't used to our relatively sedentary lifestyle with  guaranteed food. Our body still hoards fat like it did during our time as hunter-gatherers, and our body still secretes dopamine everytime we dig into a sumptuous serving of cake.
A couple of good sources:
http://www.ncbi.nlm.nih.gov/pubmed/8697046

Serotonin-releasing brain neurons are unique in that the amount of neurotransmitter they release is normally controlled by food intake: Carbohydrate consumption--acting via insulin secretion and the &quot;plasma tryptophan ratio&quot;--increases serotonin release; protein intake lacks this effect. This ability of neurons to couple neuronal signaling properties to food consumption is a link in the feedback mechanism that normally keeps carbohydrate and protein intakes more or less constant. However, serotonin release is also involved in such functions as sleep onset, pain sensitivity, blood pressure regulation, and control of the mood. Hence many patients learn to overeat carbohydrates (particularly snack foods, like potato chips or pastries, which are rich in carbohydrates and fats) to make themselves feel better. This tendency to use certain foods as though they were drugs is a frequent cause of weight gain, and can also be seen in patients who become fat when exposed to stress, or in women with premenstrual syndrome, or in patients with &quot;winter depression,&quot; or in people who are attempting to give up smoking. (Nicotine, like dietary carbohydrates, increases brain serotonin secretion; nicotine withdrawal has the opposite effect.)

http://www.scientificamerican.com/article/addicted-to-fat-eating/

Like many pleasurable behaviors—including sex and drug use—eating can trigger the release of dopamine, a feel-good neurotransmitter in the brain. This internal chemical reward, in turn, increases the likelihood that the associated action will eventually become habitual through positive reinforcement conditioning.

http://www.ncbi.nlm.nih.gov/pubmed/8697045

There is an intimate relationship between nutritional intake (eating) and serotonin activity. ...
Traditionally, serotonin has been linked to the macronutrient carbohydrate via the intermediary step of plasma amino acid ratios.

TL;DR:
You would have starved if you didn't eat fatty foods back before we had food so readily available, so your body automatically stocks up in case you ever run out.
Watch this video for more information:
Why our brains love junk food