I believe AIG was obligated by contract to give bonuses, because paying bonuses is an obligation in the contracts of their Executives. Each AIG board has it's own specific remedy for determining their executives bonuses. The bottom line is, AIG was contractually obligated to pay their executives those bonuses, or risk litigation.
Yes, the AIG was obligated by contract to give bonuses, and it is important that consumers and employees know that a business will honor its obligations. This is especially important at a time when the business is facing a time of crisis. The public needs to know that its accounts are safe, and failing to meet obligations to employees only weakens public trust in the company.