I don't want to bore the sh** out of everyone on the board, but this is actually a really fascinating area of the law. It is also hopelessly complex.
At the risk of grossly, grossly oversimplifying, the US tends to believe in the doctrine of "abandonment" whereby if cargo is lost at sea, if you haven't tried to salvage it after a certain amount of time, it becomes ownerless, and first person to find it usually gets to keep it. Most other countries in the world (including the UK, and Spain) tend to believe that ownership continues by the original owner - it is just that the onwer cannot reach their property because it is underwater. If someone else brings it up, then they have claims against the property as a salvor, but the original owner (or his descendants) still own it.
Of course, even if you accept the "original owner" theory, many of the people who shipped these treasures expropriated them by force from their previous owners, and often the previous owners will seek to claim they have better title than those who took them by force.
Then you have a problem area called the law of subrogation. What this basically says is that if you claim against your insurers for total loss of your cargo, and they pay up, ownership then transfers to your insurers. Of course in a nice simple world, every ship and its cargo would have one insurer, and no reinsurers, but sadly, in the real world, life is not like that. In the English courts Lloyds of London once famously successfully claimed golden bars salved off the Lutene off Holland which it had paid out an insurance claim in respect of 250 years previously.
Then you have the difficulty that all the different countries of the world apply their laws on different bases. Some apply their laws to any cargo lost within their Territorial waters. Others apply it to any vessel flagged in their country even if it founders in the Territorial waters of another state. Others apply what lawyers refer to as the lex fori (ie. the law of the court hearing the dispute) - usually when the claim is expressed as salvage. And of course it gets much more complicated when dealing with Federated countries.
Finally, you have the problem of "cultural heritage" laws which deem certain ancient and cultural property to belong to the state (at this stage, throw in legal problems relating to sovereign immunity in national courts), and "military remains" laws which offer special protection to wartime wrecks.
Lawyers are often accused of overcomplicating disputes. But treasure claims manage to get extremely complicated all on their own. I am not familiar with the Mercedes case mentioned in Jim's news item, but I am sure like so many of the others, it will make for interesting reading. The news report is surprising to me in two senses, firstly because it implies that the US courts of sided with the original owner rather than deeming the property abandoned (slightly against form), and secondly, it implies that the salvors have no claim in the property, which again, seems highly unusual. I am sure the case will repay detailed study.
Don't blame the military though. Blame the courts.