I mean the dogs aren't actually that dumb, even when the people are.
Like they know how to attract attention by barking and trying to draw you towards the person by not letting you get to them if you try to pet them and going further towards the person.
But yeah, it's a good "psa".
We had a Portuguese sheepdog, and it was very well trained, and I always kept him off the leash while outside. If there was a group of two or more, he would "herd", going from far in the front to far in the back and just constantly keeping watch and if there was a larger group and someone was left behind, he'd stand in between the person (who was probably staying a bit behind while the others walked because they were taking a piss because beer) and the group and as the distance grew, he'd grow clearly more anxious. He wasn't one to bark (because of the mistreatment from the former owner), but if he had, he'd have barked at that point.