Agreed. The people making millions at these companies are not idiots. They understand how the game is structured and take full – mostly legal – advantage of it. If someone presents you with a (legal) situation where it’s “heads I win huge, and tails I still win but just less” you take it. Period.
The idiots are the shareholders and debt holders that finance these crazy schemes when they should know good and damn well that the incentives are structured to wipe them out… eventually. But the investors are too greedy in the moment to pass up the illusion of short-term returns. The other group of idiots are the politicians, of course, who (de facto) vote in favor of these silly bailout schemes, thereby exascerbating the moral hazard.