Because money isn't everything.
What I'm working on isn't a side project, it's my main gig, but it's paying the bills nicely. But I started this after quitting from a post-acquisition job at Google paying $400k plus 4 years of retention bonus totalling a lot of money. I would absolutely have been financially much, much better off at Google. But I would have had to live in the US which I didn't want to do, and I would have spent my life in meetings, and I would have been working at least 50 hours a week on things that didn't interest me.
Currently I live in a small town that I love with no tech scene or jobs, I make a good living, and I spend lots of time with my wife and daughter. Importantly, I spend time with them whenever I feel like it, or when they need me to, and not when it's good for some company. I have great users and I enjoy improving their lives through my product, which is mostly a lot of fun to work on.
A few people have mentioned that working on your own thing requires a bunch of things that you'd rather not do - marketing etc, as well as things that are taken care of for you at larger companies such as setting up payment systems, worrying about tax, and so on. That is all true, but it's massively offset in my case by not having employees or bosses, and not having meetings. The sum total of doing things I'd rather not do is much, much higher working at a company doing those things than what I do now, where I spend most of my days writing interesting code and a relatively small fraction of my time on boring stuff.