A400m is a multinational endeavour, and might just have some export potential. JSF could be the next F16 in terms of sales - there isn't anything else from the West on the horizon (Typhoon and Rafale excepted), so unless upgraded F16s and F18s continue to sell there is a substantial profit to e made by UK business on the back of the JSF.
Nimrod didn't have the same sales potential, nor political entanglements with European neighbours, so ignoring defence strategy and focusing on business it's a reasonable choice. It probably puts some perspective on where govt priorities lie.