It's discouraged to play with someone's dog without asking first.
Joshua sees his neighbor walking down the street with his dog.
Joshua wants to interact with the dog.
Josh asks his neighbor if he could play with his dog.
Joshua leans down and pets the dog without consulting the owner.
The neighbor consents and Josh is happy as he plays with the dog.
The owner gets very offended and yells at Josh for not asking first.