So a couple of things.
First, doctors make more, way more. I'm born and raised in Europe and while wage inequality is smaller, it's not equal.
For example, for a GP here in the Netherlands about 30% are salaried and make between 60k and 80k or so. The rest are mostly independent (have their own (co) practice) and make between 100 and 150k. (all euros).
Meanwhile a Barista makes about 20k.
So there's definitely a significant gap here. The difference is that in the US the gap tends to be slightly bigger, and the tax slightly lower at the higher end of income.
Another difference is that education is highly subsidised: my college received about 12k or so per year for my tuition, 10k straight from the government, and 2k from me, and I - and everyone else - got a 2k a year loan from the government which is turned into a 100% gift if you graduate. I use this gift to pay my remaining 2k tuition fees, so tuition is totally free. I still borrowed because studying full-time leaves me not enough time to work to pay for a little over $1k a month on rent, food, insurance etc. But that debt is very small and also provided by the government at currently about 1.5% (it's always very low, don't think it ever beats inflation).
This basically creates an incentive to become a doctor, without a risk of lifetime crushing debt. It also creates an opportunity for people to choose what they love to do. Money plays a role, obviously, and this is how market inefficiencies are kept in check, but it's not the sole factor.
Now being a doctor obviously sucks in terms of working pressure. But there's still plenty of incentive to become one, but not enough incentive to work 80 hours a week like you may see in the US where you want to make mad bank because if you don't your student debt will crush you. I dare say it brings a bit of life/work balance to doctors, of whom as I gather live a pretty stressed and shitty life professionally.
You'll quickly find though that if indeed studying is cheap, if indeed you can make a living as a barista to fall back on, you may as well pursue what you actually like to do, and for most people that's not pulling espresso shots. A system like that makes quite a bit of sense.
As for the barista making just 20k... it seems low but the cool thing about large parts of Europe is that it's very affordable on low wages. For example if I didn't have so much equity (more than 30k or so) I would get a roughly $300 subsidy from the state for my $1000 rent. My insurance is just $90 or so, but the state pays me $80 for it. Primary, secondary and tertiary education was all de facto free and I was able to study at some top institutions in the world (both here and North America and Asia, without paying more). As a starting entrepreneur I get tons of tax cuts and barely pay tax right now, and if I lose my job I don't get silly foodstamps, I get like 80% of what the Barista makes as long as I show I'm applying for jobs. Yet there's plenty of incentive for me to strife and do better, up to a certain (quite high) point when taxes scales are such that it makes little sense working more hours, but doing more productive or valuable work is still very rewarding, which results in a very decent work life balance, health etc.
In short, while Europe is very far from perfect, and while some countries have an easy position (e.g. Norway, resource rich, or the Netherlands, small and manageable), there is this tendency of Europeans to look at the US and think 'wtf?' when it comes to social and economic equality, work life balance, wage gaps, taxes, healthcare insurance, food stamps etc, which seem to be very poorly designed in the US, despite a tremendous amount of economic and sociological wisdom produced by American academia that ostensibly goes unnoticed by policy makers.