This would be a consumer protection law like any other such law.
Forcing the vendors to sell only products that do what they are advertised cannot be considered in any way as "forcing unnecessary things upon people".
Any computer without ECC memory is a computer that does not compute from time to time and you have no idea when that happens.
Originally, any IBM PC or compatible had memory error detection.
All this problem of the computers without ECC memory has been created by some evil Intel employees, who have conceived around 1994 a scheme for market segmentation between "Pentium" and "Pentium Pro".
So they removed memory error detection support from the Pentium chipsets (Intel Triton), so that this would remain a marketing feature exclusive to the "Pro" Intel products.
Obviously the removal of this feature from "consumer" products was done without any price reduction, which made happy also the memory vendors, because this trick increased their profits.
So in the next years this market segmentation method became the "standard" business practice, preying on the naivety of most computer users.
A consumer protection law should force that any computer or motherboard must support ECC, which adds a completely negligible cost.
The end users may buy non-ECC modules, if they choose so, but non-ECC modules should be sold like cigarettes, with a visible advertisement that using such modules may cause unpredictable errors in your computer.
"All this problem of the computers without ECC memory has been created by some evil Intel employees, who have conceived around 1994 a scheme for market segmentation between "Pentium" and "Pentium Pro"."
I hate to break it to you but the computer I had in the 80s didn't come with ECC. Non-ECC computing was a thing WELL BEFORE Intel tried to think of market segmentation. Revisionist history is not welcomed here.
> Any computer without ECC memory is a computer that does not compute from time to time
So are the computers with ECC memory. It's not an absolute protection either.