In the UK, many modifications are restricted. For example, if I was to replace my halogen car headlights with LED ones, the car would be technically illegal, uninsured and fail inspection (if they notice). Exhausts can't be noisier than factory, which means in practice all aftermarket sports exhausts are illegal.
At some point, I assume modifying drive-by-wire systems will become legally restricted.