Trainer Battle Shiny

Don’t know if it’s supposed to happen, but on the path to Midna Town, there’s a Trainer named Rich Boy Noxx, just past the Dark Cave. Triggered the battle, and he said he’d bought the best Pokemon. Immediately sends out a shiny Porygon.
Again, don’t know if he automatically has a shiny, but his other pokemon, Buizel, was normal, so if it was random, I don’t know whether I’m annoyed that my first shiny was in a Trainer battle, or if I’m too amused at the coincidence to care.

It was random