Pets may select toilets for quenching their thirst because the water is often quite cool. Obviously, the pets' own bowl is the preferred source from an aesthetic perspective, but if the water in the bowl is clean, it is most likely that no harm will come of it.
Many outside dogs and cats like to drink water from sources other than their fresh clean water bowls. When dogs go with their family on vacations they often drink out of nearby lake and river waters.