Prisoners are exchanged for political gains all the time. Lots of IRA and loyalist prisoners were offered early release in order to achieve the Good Friday agreement.
I wonder whether deep down they knew the original trial that had convicted Al Megrahi was dodgy and he might have been offered up as a scapegoat to close the book and claim justice, so when it came to the Libyans demanding him back in exchange for whatever, it was seen as a more reasonable trade than had there been more confidence in his guilt.
More serious IMO than our 'U turn' over Al Megrahi was the U turn in chumming up to Gaddafi, Tony Blair went over kissing his ass like Galloway did to Saddam, if Gaddafi was sponsoring terrorism and behind the Lockerbie bomb then being his best mate was a bigger insult to Lockerbie than the Al Megrahi release.