try to imagine the internet without any reliable search engines and no paywalls. In this model all the information is free and out there and is either completely unusable or impossible to locate and no chance of a concensus on what information is the highest value.
If there is no added value why do people pay then? They could put their work up on Xarchiv or just post it on their own web site or submit it to many other journals. When it comes to other journals the model is either author pays or reader pays. Elsevier is reader pays. so called open content journals are author pays. There's even hybrid journals where if the author doesn't pay the reader must. For most journals there usually is also a page charge to the author no matter what.
Yet this people willingly submit their work to journals of both stripes.
The cost is what prevents a tragedy of the commons. Journals who have good names are desirable to be published in and also desirable to peer review for. This becomes a virtuous circle and tends in the long run to promote the best work worth my time to read. That's what I want. there's too much to read. I want some filter on the process. Some level of curation.
When publishing houses can enforce that with either model then cost of that is negligible compared to the resulting value.