I don't know the exact reasons why an APU may be kept running during the flight, but I've done a flight before where the capt decided to keep the APU running (A320 iirc) due to extreme temperatures at destination airport (in excess of -30c) and he was a bit concerned whether or not they could get the APU working again in them temps.