You can ask a similar question about UK and South Korea. UK's per capita GDP is ~40% higher than that of South Korea and UK has a higher population. Yet, UK has no real product of significance while South Korea is among the top global producers for ships, automobiles, electronics, semiconductors, chemicals, etc. So why is the UK significantly richer than South Korea?
South Korea barely inches ahead of UK in per capita gdp.
While I can agree UK gdp is inflated relative to the wealth of the country, it is also a slightly more populous country than SK, so it's not too weird that they have a larger total economy.
It just comes down to gdp being a poor measure because
1. Countries decide their own counting methods.
2. Countries make "transactions" on different things.
Example:
Country A uses tax money to reduce healthcare costs, which actually penalizes their gdp because people are paying less.
Country B instead uses tax money to subsidise a company, the company in turn buys an extremely expensive health insurance for their employees using tax money, and the health insurer in turn uses the tax money to buy healthcare. That is 2 expensive products sold (healthcare from the hospiral and the insurance from insurance company), to achieve the same effect as country A.
Gdp rewards you for doing lower option while punishing you for the upper option:
And any country that realized this and that also cares a lot about looking strong on international rankings (US, India mostly), can then use that knowledge to start inflating gdp.