Q. Why do so many people study in y’shivot if they don’t want to be rabbis?
Of course there is a benefit in learning whatever your motive, and studying in order to pass exams should not be discounted. But even when you study for an ulterior motive, the sages were confident that mitoch shello lish’mah ba lish’mah – “From doing something which is not for its own sake one comes to doing it for its own sake” (Pes. 50b). This applies not just to learning but to everything.
Some rabbinic sources speak of helping the poor because one day you might be poor and would need help from others (they say there is a wheel that constantly turns and who knows how it will turn for you) – but the best motive is to do the right thing simply because it is the right thing.