What you said isn't true for quite a few countries.
That's quite possible, but could you name a couple where locking a raspberry pi type of computer would be illegal?
EU Right to Repair Directive specifically prohibits manufacturers from using HW/SW locks or firmware limits to block part replacement.