GDP measures the value of all goods and services produced in a country. A legal scam can hide as a service and get counted.
This is why cars are good for GDP but mass transit isn’t, because a lot more cost goes into a car than a bus on a per rider basis.
The same goes for health insurance. Simply paying a doctor for services is far less GDP than paying an insurance company who then pays the doctor after taking a cut.
Once you realize what GDP measures a lot of what countries do makes sense.