If my husband's dog is going mad running the fence, barking, and howling at the top of his voice, I can yell "Charlie be quiet!" and he will look at me, then go back to barking. Only when he resumes, he makes a whispery high pitched "woo, woo woof!"
I have no idea how he learned it either, because we made no effort to teach him that. It's funny because his movements are just as intense, just less volume.
My dog knows a lot of tasks, he can alert to seizures 15 minutes before they happen which is extremely useful. When our daughter was an infant he would try to entertain her when she cried. If she was in her bouncy chair, he would use his paws to bounce her until she started laughing, and if that didn't work he brought her pacifiers and toys, or did weird dances for her. She loved it.