Your Google-backed guess is as good as mine.
The most likely reason for such an expensive prosthetic leg I can imagine is medical judgment; that particular prosthetic leg was the best fit, and the US budget is presumed to be bottomless, so it was procured. It's still a pretty lousy reason, since prosthetic legs in the USA are typically priced at "upwards of $6,000" [
MIT News]. I don't know that an awkward fitting for a prosthetic accounts for 10 times that price, but I have no other explanation.
Similarly, I don't have any specific information on why he was released. March '04 is the same month that the so-called "frequent flier" program -- which consisted of constantly moving Gitmo inmates from one cell to another to disorient them in preparation for interrogation -- was shut down, and
General Geoffrey D. Miller was released of his command in Gitmo in order to command Abu Ghraib. It's possible, though it's only speculation, that Massoud was released as a reaction to the criticism Gitmo was receiving at the time.
[
Abdullah Mehsud on Wikipedia]