When you donate something, it doesn't get returned to you. That's the whole point of donation right? and common people don't simply throw in riches like that. These are gifts received from different countries, the Travancore Kingdom used to trade with different countries around the world and other countries within the subcontinent. This wealth includes gold coins from Rome, diamond necklaces, golden thrones, plates made of silver, statues of gold and most gold coins are not from here because there weren't gold coins. By any means, I don't think any of these were public donations for the temple. For one, not many public were allowed in the Temple premises in those times.
Mosques are places Muslims assemble for prayers right.
Temple is considered an abode of the deity people are worshipping, no it's not a matter of priority more like fundamental difference between Middle Eastern and South Asian religions.
The problem is, these things are not stored in cash. The money say $20+ billion is just the value of the commodity, it is calculating the weight of gold, silver, diamonds etc... but not considering the Archeological value. This pretty much makes it useless, as it cannot be sold off just like that. Sure, if these things were hard cash, we could give it away for the greater good, that's not the case.
@Jyotish I think it'll create unnecessary intervention of Temple authority in state affairs and vise versa if they were given control of these kinds of money. That said, a lot of temples have given undue credits to the state for nothing in return. I guess it's time the government keeps their nose out of Temple affairs especially rolling temple funds.