A company can sell for any number of reasons. Executives might have most of their compensation package locked up in performance shares that only pay out when the company exits. Heck, a lot of "executives" are just contractors with health insurance whose key payout is dependent on increasing the value of the company ahead of an exit.
Negotiating compensation packages is step N of M in corporate financial warfare. Board of Directors and executives can choose to compromise the independence of the company, or not, when negotiating compensation packages. They can also choose to align their financial success with the long-term success and financial independence of the company.