My ebike is road legal in the UK. But the controller can be used to override the settings and use it as an illegal bike. I don't do this because if I got caught then I can loose my driving license. It would be deemed as a moped/motorcycle which won't have an MOT, insurance, tax. Which basically means they could come down heavy and also pin driving a dangerous vehicle (ie no safety checks via MOT). Not worth the risk.
Sadly the police here only seem to be interested in enforcing these laws when it's in their favour, like finding a legit way to bust a drug dealer.