This is something I understood only after having started my first company. I was completely happy and dandy working for someone else, actually I thought that someone else was quite nice in even paying me a salary.
But then exactly that realization of the opportunity cost of not having my own company kicked in. Only in hindsight :) (plus of course the immense amount of experience I gathered in between)
For me it just happened. I think I was lucky or I just threw myself under the bus and hoped to get better on the other side ;)