Conscious actions come from conscious beliefs that an action is desirable. As the action is repeated it might become habitual. Even though the original belief is displaced with a different belief, our actions are usually still driven by the old habit. So, we jump to the conclusion that we can prevent the beginning of bad habits by having only valid belief systems. But, there is more.
Beliefs come from teaching, experience and motivation.
When we were younger, much of what we believed came from what we were taught. Religious beliefs can be very profound, and teachings about them can be intensive. In addition, as we grow, we have experiences that mold our thinking. If we are attacked by Mr. Smith's dog every time we go down Elm Street, we probably come to think that Elm street is dangerous. In addition, we might be suspicious of persons named Smith.