The legality is based on the nebulous term "Continuous rated power", which is not the maximum power, this can and will be higher, sometimes significantly. It is also simply what the maker decides to rate it at, not a technically defined characteristic, so "very" open ended.
So, even legal bikes...