It probably helps it bond with its owner. “Humans in general are such massive assholes but Larry here is the only one that gives me pats. I will do anything for Larry, he is the only good human.”
I'm using default with absolutely nothing tweaked except blocking all hexbear and lemmygrad servers I know of on the website, so that sounds about right yeah
My father has a service dog through Paws for Purple Hearts/Bergin and one of the early commands they are taught is a release command that is for these kinds of situations. My father only really uses it for kids that are enamored with his dog but there are the rare situations where it is appropriate to ask if you can say hi.