I’m going to give a third-party anecdote, as my brother is a MD, and is his wife. Because I asked him about this nearly 20 years ago.
First, my family is probably upper middle class in terms of wealth and paid for his undergraduate education completely, and helped (not 100%, but a good bit) with his higher education as well. But even so, there was a LOT of debt accumulated.
So, when he first began to look for professional employment, it was where the money is/was. A lot of young doctors (and lawyers) are drowning in debt, and are looking to that first.
Second, echoing @bump’s point, a lot of small family practices are the epitome of being your own boss, and ALSO having to do it all yourself. Between the requirements, the filings, the the fact that the more people you hire to do it for you (so you can, you know, see patients) the less money and/or time you personally have left. No, much easier to be part of a group/hospital/etc.
Another, related issue, is that by the time you’ve put in your years in your hospital et al, and paid off your debts, you find yourself thinking about going into personal practice, because said group/hospital keeps pushing you into ever more administrative work. But by this point, based on typical patterns, you now have kids, or even teens considering going into college, and suddenly money comes right back into the picture.
So by the time you may finally be as financially independent as you want, you’re late 50/early 60s, and you open up that little private practice you always wanted… or you’re ready to retire. Or one, leading directly into the other, because after being your own boss (back to my second point) and working extremely hard, it’s just not worth it anymore.
Everyone’s experience will of course be different, but that’s the condensed version as I’ve understood it from my brother, sister-in-law, and their reported comrades.