The discussion really depends on which country we're talking about, but basically speed bikes are not illegal. They're just considered as moped, meaning a 50cc motorbike and have to respect all the rules mopeds are subject to, such as:
- Having a license plate and back mirror
- Be insured
- Wear a helmet (not a bike helmet, a moped/motorcycle helmet)
- Drive on the road, not on bike lanes
Nobody is arguing they're equivalent to a 300cc motorbike.