Because you don't have to have only one reason to work. I mean, everybody needs some amount of money for basic neccessities, but after that, it's a complicated equation of different priorities. And if you choose money only, then you're spending the best time of your day maximizing only one resources, while letting everything else take the back seat. Why do it if you can get socialization and meaning from work too?
Also, I don't understand your point about company not being hesitant to eliminate you. Yes, but so what? There are two parties in the work-for-hire transactions, and of course, both parties are looking out for their own self-interest. I see no reason why they should extract the same exact resources from this transaction, though.