Passing the CE certification is annoying, but hardly a significant cost compared to design of the product. Notably, the law forces companies to put their ass on the line if things to wrong, by registering their name to the product they produce.
We also have laws making the store selling the thing that burnt down your house liable for what they sold, which make them think twice about selling a random off-brand fire-starter with unknown manufacturer. This worked great until Temu, Amazon, and Alibaba entered the market claiming to be "marketplaces" connecting "importers to suppliers" while clearly behaving like a store.
The core issue is that, if the producer cannot be sued, the seller cannot be sued, then there is no reason to follow any safety what-so-ever. So fine the distributor until they put some quality control or standards on the producers they give market to, may solve the issue.
The US has this issue as well, though more focus on individuals suing for each case rather than broad-spectrum compliance regulation. The outcome is the same; with nobody to sue, there is no reason to make things safe for human use.
CE itself is the least of the issues, and is indeed relatively low-cost for mass-market consumer goods, (this is not true for niche products,) when it is taken into account in the original product design.
From my perspective (as a non-resident EU citizen), it seems the EU is addicted to cheap products from PRoC which do not comply with a variety of EU regulations, because actually enforcing compliance would drive up consumer prices, which is politically unacceptable. This also seems like the reason of the lackadaisical enforcement of regulations.
Essentially, allowing in PRoC products, then complaining is an easy way to keep prices low while continuing to introduce regulations which are expensive to comply with.
Put another way: why does the EU manufacture a declining share of its consumer products, at a time when automation makes mass-production less labor dependent than ever for many industries.