Ivy league schools, with their enormous endowments, are free or nearly so to those of average means, or at least cheaper than any flagship state university that provides competitive quality of education, where tuition is often $10k per year.
Maybe for some people (see previous comments re scholarships), but not for everyone. Take Barack Obama as a case in point. Supposedly brilliant, goes to Ivy League schools, had student loans that took decades to pay off.
Now IF you can get a scholarship to one of those Ivy League schools, and it covers living expenses as well as tuition, then you obviously don't need to worry about student loans. (And of course the same applies if you get a scholarship to a state school.) But it seems pretty clear that a lot of people aren't getting the scholarships, but choosing to take out loans to attend the expensive schools anyway.
And you will not get a better education at Harvard or Yale than you will at most state universities.
Those were probably law school loans, and he jumped around in undergraduate and then bought a mansion rather than paying off his loans, which was not a crazy decision considering he was a former law professor who would have likely returned to that well-compensated, secure role had his political career falied. Even before ascending to public prominence, he held
substansial assets. He may have claimed he and Michelle didn't have an easy time with their loans as an attempt to gain empathy from young voters, but Michelle alone was
making a $250k+ salary before becoming First Lady.
Moreover, most of the no-loan policies in the Ivy League are relatively recent, from the mid-00's. But things are better than they were at huge-endowment schools.
Depending on who you are, you may or may not get a better education at an Ivy League school than a top-flight state university. But the Ivy League school will likely be cheaper, unless you're from a state with very generous scholarships available for in-state students. My home state was not, nor are many states.
And I personally went to a pretty-good but not Ivy private university with a small endowment, but I received decent scholarships and studied computer engineering, which the school is very good in, and that enabled me to pay off student loans very quickly.
But pretty much anyone who can get into an Ivy would find it worth their while to go.