If a bonus is paid to an "insider" for services, and it unfairly improves the position of that executive in the bankruptcy within one year of the bankruptcy filing, the bankruptcy trustee or a creditor in an adversary proceeding to "claw back" the bonus as a "preference" (which is a bankruptcy code version of a "fraudulent transfer") from the person who received it.
There is not a bright line rule governing bonuses in these situations, and such actions within a bankruptcy case have mixed success. The bigger the company, the more likely it is to succeed.
Usually, the bankrupt in a Chapter 11 filing will seek to have a plan adopted that ratifies the bonuses after the fact and often will pull off that goal.
For the bonus to be value there must be a substantially equivalent exchange of value in the grant of the bonus in which the services provided for the bonus are substantially contemporaneous with the grant of the bonus. This should be easy to prove in most cases, but bankruptcy judges tend to be reluctant to overturn these bonuses.
This tactic is often abused and often prevails. But, there is a legal mechanism to challenge it.