The reason Snipers like going for a walk sometimes is simple: windows. For your Sniper to shoot from his current position, he must have a clear line of sight to a window of the garrisoned building and that window must have a helmeted enemy noggin in it. No noggin, no shot. No shot but an attack order = time for a walk. If you think about it, this makes pretty good sense.
It’s the same COH building logic that allows a grenade to sometimes kill an entire MG squad in a building — or sometimes only one squad member. Get that ‘nade in the right window, where the MG squad is clustered together, and you got a good time coming. In a big building, where MG members disperse into windows on opposite sides of the building, you are guaranteed an incomplete kill with one grenade.
NOTE: You can try using a regular, uncloaked unit like a Rifle squad in conjunction with your Sniper. The Rifle squad will cause the MG (or any garrisoned unit) to change windows, so as to fire on the Rifle squad. If you time this right, your Sniper can fire and instantly kill the MG gunner before he opens up. Do this too late, and your Sniper will get suppressed/pinned right along with your Riflemen, even though he is invisible.