> Journals justify their fees by claiming its for typesetting [..]

Because they used to actually be doing that. Historically, science journals were pay-to-play because the journal had to typeset your document and print it. But with the advent of computers, they had to pivot while still retaining their revenue streams.