We never allowed strangers or visitors around our chickens especially kids. No one carried the baby chicks around or the hens especially kids. Our roosters didn't feel threatened by any of us because we didn't pick any of them up unless they were sick or injured and our roosters never flogged...
Some peoples actions are seen as threatening by a rooster in which case they'll attack.
If aggressive roosters weren't free ranged in areas where visitors or kids could be attacked it would prevent a lot of attacks.