How does guard reaction to sniping work?

After sniping someone from afar the guards at the victim's position seems to fire back because I hear the sound of bullets flying past me. However, they didn't seem to hit ever so I ignored it and kept sniping people. Then after like 3 minutes of missing they suddenly hit 3 times in a row, killing me in maybe 1 second. I don't think that they came noticably closer to me. How does that work?