If this isn't unintentional, then it's just mean. After switching my Bronzong's ability to Levitate, I noticed a drop off in trainers using ground moves used against it. Went back and tested this in Solaris Garchomp battle. With my Bronzong having Heatproof, he used Earthquake in 10 out of 10 battles. With my Bronzong having Levitate , he switched to using Fire Fang in 10 out of 10 battles.
I was also able to replicate this with another trainer predicting my Seaking's ability and only using electric attacks when it didn't currently have Lightning Rod.
How do they know!?