I own a 501(c)(3) corporation and I'd just like to expand on this a bit. The 501(c)(3) designation (at least in my state) prevents any employees/members from receiving raises or additional compensation beyond a salary which has to be preset each year given by my state's guidelines on "reasonable compensation" (And they're actually decently proportional to overall profits, my board of directors can only pocket ~5% of the profits each and standard employees can account for another ~15% max). So this means that non-profit medical schools must use the remaining budget for their students and facilities. Although they still wish to make more money, their salary increases at a marginal rate compared to overall income and cannot exceed the cap set by the state and that figure cannot increase if they make more at the end of the year than expected. But now we look at for profit schools, and just as The Real SVB said, they can pay dividends to shareholders and hand out raises as desired. Now greed is a risk factor in the student's education, and that's never a good thing to have.
If we did some (extremely rough) calculations:
Assume a school has 600 students between all four classes. The average tuition over four years is 25,000/yr when averaging IS and OOS. So now the school has $15,000,000 in gross profit (Likely to be higher due to donations and other sources of income, but I'm keeping it simple here). Let's say $500,000 goes to expenses such as electricity, water, cadavers, etc. (Likely an overestimate) and leaves $14.5M in net profit. Now lets assume 6 members are classified as "Board Directors" and each take home 5% of profits (4.35M divided between them). So a total of $10.15M left in the budget. You now have $2.175M (15% of 14.5M, percentage can heavily vary by state) left to pay the remaining employees which should be very plausible (This part I'm unsure about, as average salary for "Professor of Medicine is 142,000" but I'd imagine that number can be reduced by hiring attendings who don't primarily teach). So the medical school has $7.975M left in the bank. If you're a 501(c)(3) school, this all has to be invested into research, facility improvements, student education, etc. If you're a for profit school, and share holders are looking at $8M cash, they're more likely to say "Ehh who needs that extra student lounge/pathoma subscriptions for students/one of the PhD researchers who doesn't have very promising results yet when we deserve that extra 1M from our investments." It can also increase desire to raise tuition more so than non profit schools because they can pocket more.
Adcoms on here will probably laugh at my terrible estimate of medical school financials, but I just used it as an example of how greed+massive gross income should not be a factor in a student's education.
Tl;Dr When dealing with several millions of dollars, for profit schools can take however much they want as long as minimum accreditation standards are met. Greed + massive gross income is a risk factor in student's education as it encourages the school to barely maintain minimum standards and pocket the rest between executives and shareholders rather than reinvesting in research, facilities, etc.