Because the control freaks of most city governments would much prefer you not have any pets.And many local ordinaces that are unconstitutional are never challenged.
I hope the dogs’ owner did something to get the bad taste out of the dogs’ mouths.
I usually give mine peanut butter after such incidents. Comfort food for dogs.