I went through my entire 20s thinking this, and I have strong opinions about it so sorry for this long post...
Back when I quit my 9-5 job in 2006 my favorite quote was by the creator of Winamp... "For me, coding is a form of self-expression. The company controls the most effective means of self-expression I have. This is unacceptable to me as an individual, therefore I must leave."
No company deserved me because I was a creative innovator, and even though working retail for $10/hr wasn't using my CS degree, I'd rather do that than make $70k getting someone else rich. I thought I deserved $250k since I was obviously going to get them rich - so taking the $10/hr job doing mindless work was less of a sell-out.
The next 8 years I tried a lot of things, and went $20k in debt. When I reached my 30s, I realized a few things:
1. You can be a mercenary and get the skills you need for your own business while working for someone else. You learn and get faster while doing tasks for your employer, so even though the code you wrote is owned by them... the code you write for your own business will be better and done faster.
2. If you're worried about getting them rich... just do what they say instead of innovating. Most companies don't innovate, they just maintain the status-quo and have you build systems that meet existing needs and save a little bit of money. You aren't making the next Snapchat at a 9-5... and if you are, you should have equity.
3. Freedom is not just about having the time to do things.... I had all the time in the world in my twenties but no money. Being broke basically put me in a prison. I couldn't go on trips with friends, couldn't take girls out, couldn't do what I wanted because I'd have no money for it. Now that I have a full-time job and work on side projects, I have the opposite problem where I have money but no time.
Overall I think having a 9-5 job works better for my lifestyle. Maybe I just needed more discipline and I could have succeeded as an Indie developer making games, marketing software, apps... and whatever other shiny thing caught my eye... but now I do that stuff on the side. I still hope I succeed as an entrepreneur and reach a point where I have complete freedom (time & money)... but now that I'm older I realize that was always a long-shot.