I assume you have the US in mind? This is less true in the many developed countries where education is free and/or programs exist to cover living expenses during studies.
As an unrelated observation, the effect known as Berkson's Paradox would probably trigger along the way which is an interesting and little-discussed factor in this sort of thing. Two factors for getting in to college being wealth/connections and intelligence/ability.
Link for the lazy: https://en.wikipedia.org/wiki/Berkson%27s_paradox
As a counterexample: Dutch universities can’t select for students (for most studies), and annual fees are ~€2k annually (regulated). There will be some bias towards wealthier backgrounds that are more able to invest that money and time, but compared to the US/UK systems I expect it is minimal.
This is not unique, I think systems in the Nordics and Germany similar.
Wealthy students get the best grades since their parents send them to expensive schools designed to maximise this system. They then get into the "best" universities.
What do the Dutch do if there are 10k spots available in a given university and 20k people apply?
Yet, people who need to cover their own living expenses have a far smaller success rate, need to drop out more often or need to pause studies to work.
Programs to cover these living expenses exist, but they are limited, and not everyone who is not eligible for these can easily cover all expenses.
When access to education is considered an actual right, living expenses tend to be included in the conversation (as you just pointed out). Unlike merely incidentally affordable education.
My family could afford neither, and I don’t know what I would do if it weren’t possible to work in my favorite field without a god forsaken degree.