I just encountered another aggressive dog tied to a bike rack. That’s a good way to get your dog pepper sprayed, as cyclists don’t have any other options to recover their bikes.
Some cyclists have a fear of dogs, and how loving your dog may be, is not obvious to some cyclists. Bike racks are for bikes, not dogs.
There are usually other, more considerate, nearby places to tie a dog up. A bylaw against tying dogs to bike racks would reduce the odds of such confrontations, and may be overdue.