All of these limitations go away if publication is on-line and the author, as is increasingly the custom, does the typesetting. It serves as a competitive quality filter, so that authors can compete on how many publications in refereed journals the have gotten accepted. Other systems, such as inclusion in specialized lists can serve this function even better. The very best hiring and promotion committees don't just count refereed publications, they actually evaluate the work. It makes the papers better.
Authors often acknowledge contributions of anonymous referees.
It has an archival function. Once published, the paper cannot be revised by the author without a new publication. This helps historians and provides a basis for settling disputes about priority. On the other hand, it leads to unnecessary publication when an old paper could be improved, but a new one has to be written. With electronics we can have the best of both worlds.