My sister's female GSD does this to my female GSD when someone is walking down the street. Dolly is alpha and does the protecting and doesn't like Jazzy or my lab, Cisco to be too close to her when she is in her alert/protective mode. Both my dogs bark too but Dolly is the yard/house sentinel. :-) If Dolly is not outside then Jazzy takes over sentry duty.
Rompin' Stompin' Ragtime Jazz - "Jazzy"