Journals do have a value, but not the value that Elsevier extracts out of them to the tune of billions of dollars a year in profits. Facilitating peer-review, being selective, indexing content, archiving and copyediting does indeed cost money. If we had a world where there were a large number of people dealing with peer-review referee selection, managing correspondence for free, and copyediting for free we could easily not have any publishers at all, and no subscriptions or article processing charges.
Currently locking people out of information that is often funded with public money is not good for society. So having a small publication charge that can be covered in research is a good compromise to keep this work going on. Now the reward system of publication with impact factors and citations is indeed also entirely broken but that is another issue. But there is a lot more work that is thought of in the publication process. Yes peer reviewers are not paid, but finding the right reviewers, dealing with conflicts of interest, getting them to respond, and corresponding is not free. It takes time. And time is money. The more selective a journal is, the more they have to reject so those papers cost you time without a finished product. All of this does not cost the money that Elsevier reaps but it is not free.