Rather like amoeba which can move and alter their direction away from an acidic environment and home in on a more satisfactory alkaline environment humans tend to move away from pain and towards pleasure. In humans it is far more complex. There is the case where a pregnant female is a drug addict and continues to use pain killing drugs like heroine and as the foetus develops it simply doesn't develop the level of pain killing functionality in the brain that it would otherwise because it is immersed in a saturated supply of painkilling drug already. The net result being that as the child is born and grows it has less inbuilt ability to kill pain. The child, though it doesn't know it, is in more pain than other people. In the random spread of available experiences especially as it goes through adolescence if it encounters pain killers it happens to find them very pleasant (as opposed to a well balanced person who finds it a bit disorientating and sickly). The drug redresses the balance and the person feels more "normal". Of course the person doesn't describe it as "normal" because to them it is a high. But the biochemistry knows it is a more harmonious balance of things. It is a condition that the biochemistry wants to maintain. To the individual, refusing to take the drug when it is available is like trying not to drink when you are thirsty. You can resist while you are a little thirsty but the feelings get more and more compelling. It is, for all intents and purposes, a matter of life and death. There has been a lot of scientific research into this and it is undoubtedly the case. Children whose parents take drugs when they are in the womb will tend to prefer the same drug. The biological investigations entirely back this up. So what of other vices? Without going into it in too much detail a lot of vices are the consequence of oppression. Oppression prevents an individual from doing the things which keep the natural balance. It is extremely complicated because a lot of this is manifest in what we call intelligence or conscious "thinking". But to apply threats and pain to children to cause them to behave in certain ways sets up conditions in the neurological system which are tantamount to survival issues. When the oppression is contradictory (which it always is but that is another long story) the individual is set on a course of pathological behaviour to maintain their sense of equilibrium. Since it is contradictory more of the "drug" or patterned behaviour to seek pain killing activity is constantly required. Alcohol and nicotine are simple examples of drugs to kill the pain but sex and gambling are also ways to get instant pleasure. They can easily become compulsive. When this is the case it is not such an easy thing to simply take away the pain killer. Sometimes by doing that it leaves the person in a terrible state and their choices and actions become more extreme. Sometimes one has to resolve the inner conflict, the repression and the miscomprehension of their environment. Counselling and psychotherapy are modern methods to try to deal with this issue. In the past religion was seen as a remedial solution. The problems with religion or other forms of ideology to relieve the pain is that if they do not resolve the inner problems then the resultant behaviour simply passes the problem on to other people. How does one otherwise make sense of or explain the bizarre collective behaviour of the Christian Inquisition or the murdering of millions of Jews in the Second World War?