It's often not very good: an overzealous typesetter replaced every single italic p (as in "p < 0.05") with a musical quarter-note. Still, some of that money must be going somewhere.
That said, I would actually love a journal that offered (good) copy/line editing of accepted papers so that the science is presented as clearly as possible. I suspect this would work out well for the authors and the journal. At the margin, easier to read => more cites. However, very few journals compete on "author-friendliness". It's all impact factor this and metrics that.
They did and do this sort of editing, so it may be, sometimes, a matter of journal quality. I don't anything gets into JAMA without that level of editing.
Anyway, that's what my opinions in this thread have been based on, but maybe I'm exhibiting selection bias by having experience primarily with a higher quality publisher.
I certainly didn't get any suggestions aimed at improving the readability of the text; those mostly came from coauthors and colleagues before submission, with a few more things flagged, in passing, by peer reviewers.
That's on the biology side of things. For ML, it's basically "Here's the doc class! Good luck!"
A nomogram got futzed around and, well, the ruler-only, no-calculator required, calculations were now wrong.
"A set of trial calculations indicate that the nomogram of Burton et al is accurate, but a realignment of Burton’s nomogram (for greater symmetry?) in the Clinical Nutrition text resulted in a nomogram with considerable inaccuracy."
Or look at the editing that Elife professional editors perform in addition to other peer reviewers: detailed feedback on the manuscript for the authors, including requests for revisions and suggestions for improvement." detailed feedback on the manuscript for the authors, including requests for revisions and suggestions for improvement
Maybe poor quality journals don't do this sort of thing, I'm not familiar with them & their economic models.
Uhm, I don't know if you've published a paper since the 90s but none of those are costs that modern journals incur. Or if they do, nobody asked them to.
The main thing journals do is peer review and that is all done for free by other academics. Authors do basically all of the typesetting, and although journals still insist on printing issues there's really no need for them to do so.
The only really important thing that journals do is finding and hassling reviewers.