Maybe they aren't greedy after all? People live long. If a CEO ruinw a company with short term mismanagement, they do ruin their reputation. It's not like politicians who are often elected just once and only for a few years.
Ruining a company does not necessarily mean they failed the goals placed in front of them, especially in a cult of "shareholder value maximization" that makes people think it's a fiduciary duty to take shareholder value as primary goal.
Multiplying shareholder capital through short-term dismantling of existing businesses while ensuring the shareholder do not have negative effects from it is very much a rewarded operation.