Valve is not an ordinary company. They make a ton of money, have no outside investment, reinvest everything internally on R&D and keep very small. On top of that, they run completely flat management.
They're the idealized version of what a small company making a shitton of cash would be. They can afford plenty in terms of work-life balance.