That's not true for a pacemaker or a jetliner, which will both need somebody else to certify them before they can be sold for purpose, but it is true if you make most ordinary "hardware".
The rationale is that most people don't want to make shoddy garbage and so they actually want to know what's expected of them and comply, and those who are maybe less than honest can be caught by the usual processes - after the fact admittedly but now they're guilty not of some hard to prove negligence or whatever but of specifically selling goods which wrongly claimed to meet the requirements.
My mother used to (decades ago) make stuffed animals for kids. Those needed E marks. One day a mother complained that her child had been injured by a toy, investigators show up, take similar animals for testing and... they're fine because of course they're fine mum had been following the EU self-certification process, testing materials, using proper tools etc. and so she knew it was done properly albeit in this particular case that wasn't enough - without any certification framework my guess is that's a nasty lawsuit and almost nothing she can do to defend herself.