People have been giving buildings and endowments for hundreds of years. It is not illegal to give buildings and money for the endowments. What these folks did was run a scam on the university.
There is no hook or wrong doing in giving a building. It benefits a lot of people. These folks actually did something illegal. Grouping people who actually gave to the university with people who paid a scam artist is wrong.
Hrm, I don't think that's illegal in and of itself. I engage in quid pro quo transactions all the time. For example, when I go to the grocery store, I give them money and I get bananas. This for that. Quid pro quo is only illegal when the money is in exchange for otherwise illegal behavior, such as bribing a government official to assign a contract to your company.
Of course, it's not illegal to admit someone to a university for a price. The donor couldn't deduct the donation from your taxes, or at least the portion of it which was required to secure enrollment for a given student. But other than that, I'm not aware of any law which would put someone "on the hook" for this.
There's nothing wrong with giving, but there is something wrong with giving and calling it a donation, when in reality it's a quid pro quo transaction. Which is illegal, but unprovable. Matt Levine's comment quoted elsewhere in this thread is describes the only difference in the scenarios.
The problem comes down to taxes. Donations to universities are tax deductible, but if it's an explicit quid pro quo for admission, then it's no longer eligible. So any quid pro quo donations that are written off on taxes are tax fraud.