Of all the things moss does, building peat is the one with the biggest consequences. It is worth understanding, because it is why "peat-free" is written on compost bags now.
How sphagnum makes peat
Sphagnum, the bog mosses, grow in waterlogged, acidic, oxygen-poor ground. The old growth beneath the living surface does not fully rot, because there is too little oxygen and the conditions are too acidic for the usual decomposers. Instead it accumulates, layer on layer, over thousands of years, as peat. A deep peat bog is, in effect, millennia of moss stacked up and half-preserved.
Why bogs matter
Because the carbon in all that moss never finished decomposing, peatlands lock away enormous amounts of it, more per hectare than forest. They also hold and slowly release vast quantities of water, steadying rivers and reducing floods, and they are home to specialised plants and animals found nowhere else. Intact, they are quietly doing several important jobs at once.
The cost of digging it
Cutting peat for fuel or compost drains the bog, exposes the stored carbon to the air, and releases it. A resource that took thousands of years to form is gone in one season's growing, and the carbon it held goes into the atmosphere. That is the case against peat compost in a sentence.
Peat-free for growers
Modern peat-free composts use coir, wood fibre, bark, green compost and similar materials. They behave a little differently, tending to dry on top while staying wet below, so they reward checking the moisture lower down rather than watering on a fixed schedule. For most growing they now work well, and they leave the bogs where they are.