If I remember correctly, they are allowed to have a thumb throttle if it's capped at 6km/hr (which is still very handy for starting, especially on a cargo bike). On a generic Bafang/similar motor controller, that's a purely software limit that anyone with a programming cable can change.
People who do this kind of stuff are the reason the rest of us can't have nice things. Same as with Surrons fucking up bike trails and then getting all ebikes banned from there.
Personally I'm of the mind that people should be free to tinker with their things, and regulations should be specific enough to appropriately respond the performance to whatever the thing has
It is not wrong to modify the bike that is your property to change or customize its appearance or functionality. It's wrong to be inconsiderate, or a dick. I think the distinction is important
They should be free to do that up to a point. A moped needs a licence to drive and it needs to be registered and insured and you need to wear a motorbike helmet while riding one and you're not allowed to ride it on the sidewalks or on forest trails. If your ebike is effectively a moped then the same rules should apply.
Where I live a pedal-assist ebike with 250 watt motor that's limited to 25kph is considered a bicycle and you're allowed to ride it where ever you're allowed to ride a bicycle aswell. However if it goes faster than that or is a more powerful then I think it's only reasonable that there's a different set of regulations for a bike like that. I'm not allowed to drive a car on the sidewalk either even if I go slow so I don't see how electric motorbike is that much different.