You have to take into account that the folks who get into medicine had the grades and brains and work ethic and peristence to be in the top X% of many other fields. .comparing to the "average" in those fields is simply poor analysis and comparing apples to oranges. (This notion was also expressed in a New Yorker article by Atul Gawande a few years bck, BTW, it not just my view). You won't be just the average lawyer if you put in the same effort and intellect you would in med school or residency, you would excel, and be rewarded for it. I made a lot more in law three years out of college than I will make 6-7 years out of med school. And if I had stayed in law those same 6-7 years, assuming even only minimal raises and bonuses (which is being very conservative), and even ignoring educational debt, my bank account would look very different. It's not a complicated analysis. If money is what interests you, there are many other paths you can take where your chances of making more money and starting sooner are much better.
Also always keep in mind the concept of the "time value of money". It's very basic finance but far too many on here don't seem to be aware of the concept, which is the underpinning of all financial markets. $1 received ten years from now isn't worth $1 today. It's the same concept of winning the lottery and being given the choice of taking your $1,000,000 winnings as an annuity over ten years or receiving a much lower lump sum today. Those choices are actually identical value, it's just that the winnings being paid out toward the end of the decade are simply not worth as much in today's dollars. Similarly, a physicians salary not earned until ten years from now is worth but a fraction of that amount in today's dollars. So the lawyer making $150k right out of law school (big law in a big city, not the "average", and again the average is the wrong number to be looking at) is making more in today's dollars than the doctor who brings in $200k after 4 years of med school and 3+ years of residency, maybe a fellowship. Giving the same amount of effort you have to put in and brains/ grades required to get there, law wins. That's more money sooner. And in law the ultimate ceiling is higher. Similar analysis can be made in a variety of business and consulting paths. You can't point to the X % who wouldn't get into med school anyhow as examples of how you would fare in law or business. So what if only 10% of people going into business do well -- that other 90% don't have med school caliber intellects or work ethics. You have to look to the smaller Y% who had a choice of either, because that's really the category you are presumably in. It's a waste of time analysis otherwise.
Medicine is simply a poor choice if the goal is to get rich, the years of deferred income kill you because the time value of money come into play. You have big opportunity costs. You incur more debt. And because salaries are driven by reimbursements, which tend to go down over time, not up, the ceiling in medicine is lower, and decreasing compared to other fields. It is not a choice anyone looking to maximize wealth would ever make. It's actually a financially naive decision. It only is a good choice if you enjoy it.
So while it may "annoy you to no end", it's probably sound advice.