I expect there was a combination of issues that stacked up to cause this problem.
Every aircraft type is different but generally so long as the engines are turning there is no need for the APU. Some older aircraft with low-bypass engines still run the APU in flight. There is typically one engine that is dedicated to provide the electrical power for the aircraft. In flight cooling air comes from a heat exchange with the bleed air from the engine bypass.
If the mechanical problem required shutting down the engine that would normally provide electrical power then the APU would be necessary. The APU uses a trivial amount of fuel. Its the heat exchange that is the problem. The air conditioner powered by the APU uses the aircraft fuel as the coolant for the air conditioner system since bleed air is not available. Fuel coming out of the ground is pretty chilly but this heat exchange becomes much less efficient when the fuel in the wings starts to warm up as it will during a lengthy ground stop. After running the APU to power the Air Conditioner it would eventually start pushing warm air.