Here’s an example. I require MOPP. The environment is pollution degree 2. That gives me a minimum slot width 1mm. Further, I require clearance/creepage 2.5mm/4mm.
If I have a 1mm gap between the edge of the PCB and the grounded wall of the enclosure, plus 1.5mm between copper on the PCB (outside layers) and the edge of the PCB, that satisfies the 2.5mm clearance.
But if I have 0.5mm gap between the edge of the PCB and the grounded wall of the enclosure, plus 2mm between copper on the PCB and the edge of the PCB, that doesn’t satisfy the 2.5mm clearance.