Your answer indeed has to do with how and why the placebo effect works...
In a nutshell it has to do the complex interaction of motivation, perception, conditioning and expectations. If you want to dig into the actual medical reason why, the answer likely has to do with expectations driven by reward pathways (dopamine) in the prefrontal cortex of the brain. The summary on WP describes the phenomenon as being
"...mediated by "top-down" processes dependent on frontal cortical areas that
generate and maintain cognitive expectancies. Dopaminergic reward pathways may
underlie these expectancies"
The very same processes that can drive people to bad habits (gambling, smoking, drinking) can also be the pathway to good habits (exercise, reading...). The individual decides what rewards their thoughts and energy are going to be used to pursue. Just as brainwashed people can have their heads filled with junk, people can also choose to put good things in there and whatever we feed the brain does have an effect on self-perception and what kind of person you become as a result.
The placebo effect has a lot stigma attached to it... but it comes down to the fact that for some reason it does work for some people. There are lots of examples of people whose positive thoughts helped them recover from dire situations. Did it help them survive? I don't know. Can it hurt? I don't think so. Why does it work for some and not others? I would be interested in reading research in this area, but this goes beyond your question.