I don't think that's true with law. The linked essay talks about "the 20 years of your adult life that a scientist typically spends proving they deserve a career."
You can be a newly minted, bar-passed, practicing lawyer after spending 7 years of your adult life, and 6 years if you diligently optimize your course selections (typically 4 years undergrad, 3 years law school, plus a few months studying for the bar exam). That's a heck of lot less than 20 years, and matters a lot in terms of female fertility, the topic of the essay.
And about 20% of new law school graduates will be making six figures in their new job. There's a sharp peak in the distribution of full-time salaries for new lawyers centered around $185K because of big law, with a larger, flatter peak centered around $60K thanks to small firms, nonprofits, and work that doesn't actually require a law degree. Those figures come from NALP data, and reflect the situation even during the lawyer/law school bubble the U.S. is in today.
Note I'm not saying law is a necessarily a wiser choice; I know one big law associate who slept overnight on a partner's couch so much I helped her with the transport of a small refrigerator so she could keep meals at work. That's even though she lived within about four blocks of the office. She eventually quit to write novels.