This is one of those things that's a bit odd.

If you're doing a PhD in a STEM subject and you're paying for it, that's a very bad sign (meaning that you're probably studying at a for-profit or other very low status university).

PhD students get paid to do a PhD, but MD students have to pay a king's ransom.

One could argue that PhD students are "doing work" by doing research, and therefore should be paid. However, this simply isn't true at first, especially in the US model where they have to take classes. And med students start doing work when they get into the clinic in year 3. Sure, they're relatively clueless, but so are PhD students.