Not that I'm defending the current, broken system becuase it really doesn't provide either of these benefits, but the idea is that the cost of (coordinating) peer-review (as the reviewers are often unpaid) and actual editing cost money. If services like that were actually provided, some fee would be understandable.
$5k though? That still seems a bit much.