He did the same thing at Madrid. He had one year on his contract remaining in 2013 and he could've easily ended up playing for United but instead he chose to sit on Real's bench( and sometimes even in the stands ) and collect his paycheck before eventually leaving on a free.
Honestly this guy is more of a businessman than a footballer tbh. He's very careful about his millions.