Why take on a risky career path like being a doctor if best case you're half a million in debt and that's assuming you don't get weeded out at any point? It's no surprise we have shortages of engineers, doctors, nurses, teachers, etc.
Even a bachelor's degree is on average 32k for in-state at public colleges assuming you graduate in 4 years. Contrast that with my German peers who didn't pay anything and yeah, maybe I wouldn't have been a software engineer if everything else wasn't so volatile. I certainly don't feel as essential as doctors or nurses, especially now.
Sure it's cheaper to start a LLC in the US and you can hire/fire on a whim practically, but 63% of Americans don't have enough savings to cover a $500 emergency. Doesn't exactly leave a lot of wiggle room unless your parents have a basement for your MVP and some seed money.