Ford was desperate for cash. They sold just about anything they could for cash and put the rest in hock. Had things go wrong, even without the financial crash Ford would have even lost the trademarked blue oval. In a sense Ford was lucky in that they were hard up for cash two years before GM. That meant Ford had sold everything and got their emergency cash lined up before 2008. GM MIGHT (and I say that because it was not at all certain) have weathered the storm had they done the same thing in 2006. In the short term in 2005 and before people realized just how bad 2008 would be, GM looked like they were on track for a slow but steady recovery. The financial crash that resulted in even Toyota claiming a loss was too much for GM given their huge legacy costs.
Anyway, Ford may or may not have seen a long term future with Jag but they certainly needed the money NOW so they sold at a loss despite all the work they put into the company. This is likely the reason they dumped Mazda as well. Otherwise that was a good partnership for Ford (and a life raft for Mazda).