I'm not sure how it works in SuMo but in previous generations all NPC trainers (except a very select few late game trainers) have their movesets generated by what level the Pokemon is. This means that even battles against important battles feature 'bad sets' such as Maxie's Camerupt with only Take Down and Rock Slide as attacking moves. Pretty much all Gym Leaders, Team Bosses/Admins, and any lesser NPC Trainer will be very restricted in what moves they can have. In the end it's more not giving trainer Pokemon good moves rather than choosing to give them Protect.Gotta bring this up since I went back to ORAS recently: Whoever gave random NPC trainers Protect on their Pokemon should never be allowed near enemy design again on this series. Compared to "boss" fights like Gym Leaders, Admins, or Facility Heads, who at least have basic strategies like Toxic + Protect, or EQ + Protect in Colosseum, Protect in a random battle is literally wasting a turn, because if I'm attacking, I'm probably winning the match up that's at hand anyway. Wild Pokemon are fine since they're random encounters and generated on the spot, but someone has to go in and intentionally assemble the trainer battle parties, to the point that some intentionally lack a full 4 moves. Just take Protect out unless there's some kind of strategy to it.
As for Trainer Pokemon using Protect I think it's more likely than a wild Pokemon using them. I believe a wild Pokemon has a 1/4 chance of using Protect but unless a trainer's Pokemon can knock your Pokemon out it will choose between it's most damaging move or a random status move if available. I'm not sure of the exact chances or if this applies to all AI trainers though.