Human beings are hardwired to avoid pain and gain pleasure. The subconscious mind is always trying to move you away from pain and towards pleasure. This sounds simple but in reality many factors act to make the process quite complicated. The mind sometimes gets it wrong.
The movement away from pain is stronger than the desire for pleasure.
When I talk to the subconscious mind in hypnosis it nearly always says it is trying to protect the client.
Sometimes it does this in ways that seem maladaptive. Many clients have anxiety. The subconscious mind is creating this response to stop the person going into danger. The downside is it is often overdoing it and creating a fear response so strong the client is unable to do everyday things like leave the house and go shopping.
The thought behind the feeling is that the world is painful so must be avoided. This kind of thought can be changed under hypnosis by suggesting repeatedly that the world is safe and pleasurable.
Habits like stopping smoking can be changed by associating cigarettes with pain rather than pleasure.
Over-eating is the pleasure principle gone awry. Eating that piece of cake gives you pleasure in the moment but you know in the future it will make you fat and that will give you pain. You can train your mind to stop chasing momentary pleasure.
Once you understand how your mind works you can start to change your thoughts and beliefs for more productive ones.