Other than a deaththreat from the purser,a medical situation or alcohol/drug use, i can't think of ANYTHING why a captain would decide to do what was done.
And what about the company and F/O, did they all agree?
Diversions tend to be very costly, so it must be one hell of a reason.