Not illegal at all and not really wrong either.
You get pulled over simply because you're on a bike and that's not wrong?
How about if you're black?
or in a 1974 Pinto with non-matching body panels?
It is wrong, as I said, they should be off the streets and it is a good thing that they were caught, but to do something like this to purposefully find motorcyclists is wrong. What they should do is not allow you to register a bike in your name without the proper classifications.