Hazing can be approached from different perspectives (including sociology) because it's a complex phenomenon that is not well understood nor always clearly defined. But from a psychological perspective, you are right, one of the theories used to explain the phenomenon is that of "cognitive dissonance", first put forth by Festinger in the 50s.
And yes it's a scientific theory and one of the most respected ones in the whole field of psychological sciences. This does not mean it explains everything or has no shortcomings but it means that many studies have supported its explanatory power, just as the evolutionary theory in biology is not perfect but has a lot of explanatory power in that field. Granted psychological theories are not as good as theories in other fields (long story) but as I said, this is one of the best we've got in this field.
So what is cognitive dissonance?
I'll start with an example:
Consider someone who buys an expensive car but discovers that it is not comfortable on long drives. Dissonance exists between their beliefs that they have bought a good car and that a good car should be comfortable. Dissonance could be eliminated by deciding that it does not matter since the car is mainly used for short trips (reducing the importance of the dissonant
belief) or focusing on the cars strengths such as safety, appearance, handling (thereby adding more consonant beliefs). The dissonance could also be eliminated by getting rid of the car, but this behavior is a lot harder to achieve than changing beliefs.
And here are the principles in brief (though the theory is more complex than this):
Definition--The unpleasant psychological state aroused when holding two conflicting cognitions. Discrepancy can exist between 1. attitude vs attitude and 2. attitude versus behavior.
Basic Hypothesis--The existence of dissonance, being psychologically uncomfortable, will motivate the person to try to reduce dissonance.
Five different ways to reduce the dissonance: A. Change your attitude. B. Change your behavior. C. Add consonant cognitions. D. Minimize the importance of the conflict. E. Reduce perceived choice.
One of the original papers on hazing and cognitive dissonance was by Aronson and Mills in 1959, entitled "The effect of severity of initiation on liking for a group." A paper in 1994 by Elliot & Devine suggested that the thing that people experience when there is cognitive dissonance is not just physiological arousal but also a psychological effect, a "distinct, aversive feeling." If you've ever stood in a long lineup to get an average product or see a so-so movie or get a seat at a restaurant that offered only average food at best (which happened to me last week) you know what that feels like.:)
Lastly, in terms of your job example, yes, that could be true, but keep in mind three things, one that, as I mentioned above, there are several ways to reduce dissonance. Two, that he could actually like the job that much that the pay is not significant to him. And three, it's important that an action is freely chosen (or perceived to be so). If the person in question had to take the only job that he was accepted for, he doesn't have much cognitive dissonance, unlike a person who is highly qualified and accepted to work at ten different companies and after careful evaluation ends up choosing a company that turns out to have serious shortcomings. This, by the way, is tied in with the concept of regret.
In general, it's useful to think of freely chosen effort put into something as how much you value it, and that any later thoughts or feelings or fact contrary to this are going to cause you dissonance.
Hope that this answer has been useful to you.
Aronson, E. & J. Mills (1959). The effect of severity of initiation on liking for a group. Journal of Abnormal and Social Psychology 59 (2), 177-181.
Elliot, A.J. & Devine P.G. (1994). On the motivational nature of cognitive dissonance: dissonance as psychological discomfort. Journal of Personality and Social Psychology 67, 382–394.