The psychological pressure a sniper brings to the unprotected infantry is incomparable. Just popping your head out equals death—who can withstand that?
If it's a distance over seven or eight hundred meters, or even over a kilometer, no infantry would try to kill a sniper with their own rifle. If they have artillery support, they call for fire; if not, they tactfully retreat. But what if the distance is shorter? Then things get easier. Ten or even dozens of men charge at once, willing to sacrifice a few to spot the sniper's position and eliminate him with a barrage of gunfire.