"Finders are keepers" is a common law rule dealing with lost property. Lawmakers in both England and the US have long realized there was too much a loophole in the rule and created many legal fictions to fix it.
For example, if you found a wallet on the street, with a driver's license and a $100 bill, and decided to keep the money and wallet. Can you claim ownership? Probably not. Not only you cannot claim ownership but you probably committed a common law larceny the moment you decided to take it, because the ownership could be identified through the driver's license.
In this case, the painting was claimed stolen. Whether true or not, that put the ownership of the painiting in dispute. If the painiting was truly stolen, then the original thief did not acquire title. When Varney found it in the dump, the title was still with the true owner. Unless Varney could prove the painting was not stolen, then his claim of ownership is in question.