Developing countries gather foreign exchange because the trust it more than their local currency. This causes trade deficits, as the developing countries trade goods to get the foreign exchange. If a developed country wants foreign exchange, it can swap its own currency for it. It doesn't need to sell goods for it. But developing countries have a greater demand for foreign exchange.
Developed countries may continue to do this because they build themselves around exporting in exchange for foreign exchange and don't know how to stop. This explains countries like Japan and China. They haven't transitioned from developing to developed yet, at least not at the macrofinancial level.
Switzerland has a long history as an international financial center. Hard to do that without foreign exchange reserves.
You also might consider that China and India have about a third of the world population. Per capita, India has less foreign exchange than the United States does. And China has less than Japan per capita.
Part of this of course is that it is easier for small countries to have relatively large amounts of trade and foreign exchange. The US does most of its exchange internally. It takes a deliberately mercantilist policy like Japan and China have traditionally had to generate large amounts of foreign exchange.
Mercantilism made a little sense in the days of gold-based currency. At least a collection of gold would have been a collection of gold. But even then it wouldn't have scaled. Once the amount of gold stored starts getting larger than the amount of trade, there are diminishing returns. Because spending that much stored currency at once would induce inflation. Inflation makes the stored currency worth less. So you have less than what you thought you stored.
With fiat currency, that's even worse. In addition, there is the possibility that to counteract that inflation, the country might stop respecting the currency that foreign countries hold as foreign exchange. E.g. if China were to hold Indian rupees but India switched to a different currency, then China would be left with nothing.
Developed countries are seen as less likely to do things like that. So countries are more willing to hold their currency. That makes it easier for them to trade, as they purchase imports with their own currency. Developing countries have to export to get foreign currency so that they can import.
All this gets us back to my first point. Developing countries trust foreign exchange more than their own currency. Developed countries generally have the reverse feelings. They trust their own currency more than foreign currencies. So developed countries have little foreign exchange and developing countries have a lot.
One of the key points though is that looking at foreign exchange surpluses and crediting them to trade surpluses is backwards. The trade surpluses exist because there is a desire for foreign exchange (generally US dollars). This is why devaluation doesn't work in the US. It's starting from the wrong end. It causes imports to increase in quantity because the unit price drops but they still want the currency. That of course is the opposite of the intended result.