Why did Madrid sack him? The press didn't want him because he was boring. He lost a Copa del Rey tie 4-0 to a third level team because ex-stars like Raul and Guti didn't see themselves as Copa squad players, and the press killed him. Going out - again - in the first KO round of the CL just put the final nail in the coffin.
Even without those two bad cup results, I still reckon the press would have destroyed him. Throw in the fact that Mourinho had just stopped Barcelona from reaching a CL final at the Bernabeu and the attraction of a shiny new toy to make the crowd forget another trophyless season - there was no way he could survive.
On the other side, Ronaldo was injured for two months, Pepe was out for 5. Sneidjer and Robben were sold, against his wishes, and he still got within biting distance of Barcelona in La Liga.
He's an astute judge of players, and of identifying and developing young talent and if City are serious about their "project" and at least want to make a nod to moving to FFP compliance he's a very good bet.