The trainer of the favorite horse drugged the groom who was watching the favorite, with opium in the curry. While he was sneaking around the grounds doing his dirty deeds, the dog, who knew him,did not bark up an alarm. That is what Sherlock found interesting, that the dog did not bark when stuff was going on.
it is used to indicate the watchers not saying anything because they know the perps.