ExxonMobil brought in $469 billion in revenue last year, on which they made $44 billion in profit. It's not a big gamble for them at all if some programmer who gets $100k, $150k or whatever does not work out.
Of course, some bootstrapped company, or some company which had minimal angel funding or the like is taking more of a gamble, but everything is a gamble when you have no product/market fit and only 18 months or less worth of cash in the bank.
Exxon is in the top ten for revenue, that is not a good example on your part. also, $100k is not a large salary in my book. Doubling it is the sort of gamble I'm talking about.
Of course, some bootstrapped company, or some company which had minimal angel funding or the like is taking more of a gamble, but everything is a gamble when you have no product/market fit and only 18 months or less worth of cash in the bank.