Fascinating, the first time I heard about this phenomenon is when this amusing video [1] was doing the rounds. Apparently it's a seasonal issue largely linked to them being particularly aggressive in their defence of newly-hatched broods. What's weird though is that in certain magpie-swooping zones, the swooping is selective [2]. It seems quite accepted that corvids can recognise faces and otherwise identify individual humans, but what makes it single out people that haven't attacked it is a real mystery.
[1] https://www.youtube.com/watch?v=YGGTcYfrEZU [2] https://www.theguardian.com/environment/2017/jun/28/when-mag...