I can’t speak to the sciences, but over here in history it really is because you have questions you want to answer about history and it’s the best way to go about it. You got to be passionate about historical thinking as being important and want to understand the world, historically speaking, better. If you have a good topic, and are good at expressing yourself, and are willing to put in the work, you can do good work and make some fulfilling scholarship, and maybe even land at a good job with decent pay, doing something you love (though that is increasingly harder, as too many of us are ending up as adjuncts trying to stitch a living together). I’d say a fair number of folks around here at least are “true believers” in that they believe in the good things a liberal arts education can do for humanity and want to be a part of that.
But you’re right about the whole “ritualized masochism”… the job market is horrible, there is increased pressure coming from administration and from the state, as the resources are shrinking and the humanities are getting a lesser share than the sciences (who have more outside money than we do).