The prior post was specifically talking about the US. (I assure you, arrogant dismissive doctors are also a thing in the US)
In the US, there are a number of things that artificially increase the barriers to becoming a doctor.
1) You typically need a four year college degree to apply to medical school
2) Medical schools are accredited by the AMA, which is controlled by doctors. The AMA makes it very difficult to start a new MD-granting medical school.
3) Medical school in the US is very competitive to get in. They are likely turning away a lot of people who could complete the degree.
4) Since 1997, the federal government has a fixed number of Medicare (Medicare is a federal health insurance program for people over 65) supported residency positions. That number was basically flat for 25 years. We lost about 20% per capita of doctors being trained with support from this program. The caveat to this is that the total number of residents per capita has increased over time, particularly the past 15 years or so. My understanding is that they are less likely to be fully funded, so they spend more money getting trained, and then have higher students loans (on average graduating with debt above 200k going back to the late 2000s) that they need to pay off, so they charge more.
And you can add to this that it can be very difficult to be a doctor in another country and come to the US to practice here.