Right. And to be even more specific, they are not compensated in any way (except occasionally by perks with zero marginal cost, like a free online subscription).
Some editors, who manage peer review, do get paid, but the reviewers don't.
On the other hand, peer reviewers are generally paid by the same people who pay scientific journals--academic and research institutions--with contributing to peer review usually being an understood part of their duty.
Therefore peer review could continue even if the journals didn't exist. And since both are funded by the same source there might be more money for research and review if none went to journals.