In mathematics, the publisher mainly:
- organizes the peer-review (for example by providing an electronic platform for submission, communication with authors and referees, etc.);
- provides copy-editing;
- publishes in paper (organizes printing, sends the volumes, etc.) and electronic formats (manages a website, cross-links, a database, etc.).
I would add a remark: it seems that many of the cheapest journals do all these three things a lot better than most the expensive ones. For example the professionalism of copy-editing was far better for my papers handled by the London Mathematical Society or the American Mathematical Society than for the one I got published by Elsevier, Springer or World Scientific. My only copy-editing horror story happened at Springer (seven errors in formulas introduced after the proofs).