Isn’t it a better idea for people who hope to get into one of those careers to instead go to a poor undergrad program and stand out there?
Poor choice of words. Lots of great state schools with solid educations that at minimum don’t break the bank and for many offer substantial merit aid. Undergrad debt free and work hard on GPA.
OK sure, how about this: should a person of average income be trying to get into HYPS if they plan to be a doctor or lawyer?
Because many pre-law/premed end up choosing a different career (often out of choice), and top schools give you better prospect for those alternative careers.
If you intend to go to med school you should minimize the cost of your undergrad education.
Someone from a median income household ($50,000 per year in the US, probably in the $60,000-$70,000 range for those with high school or college age kids) will probably get a very low net price from HYPS after financial aid, if not blocked from financial aid by such things as uncooperative divorced parents and the like. Of course, the opportunities to stand out in a way that will actually gain admission to HYPS tend to be much more available to those from high income households, as evidenced by the percentage who attend without financial aid.
Also, HYPS tend to have rather high average grades, which can help with the first pass for medical and law school admissions.