A huge portion of humans don't have the luxury to say "hmmmm, this startup is ok but myyyeehhh, I kinda like this one better, err idk maybe i'll just go to GiantCorp". I took jobs because they paid me to write code. The story is probably the same for 90% of humans who are doing the best they can in their own situations.
Oh yeah, and the crappy companies I wrote code for years ago? Those are the places that gave me a foundation for a successful career as a programmer. I absolutely could not have done it without them because they were actually willing to invest a little bit in me-- which (in my experience) might not have happened, even at megacorps or unicorn startups.