As karl said, its pretty obvious, the Blizzard have implemented server side scripts, which flag accounts by certain criterias, probably by time spent, doing bot-like activities like gathering herbs/ores, and they compare this time to the time, spent on the account for doing not-bot activites, like running dungeons, lfr for example.