With the Wehrmacht, with the Panzerjager doctrine, when an StuG or other AT tank is upgraded with the optics and is on defensive position, it fires on the infantry. I can read that they do it to don’t get spotted by the infantry, but it just engage every single thing of the enemy army and get spotted instantly.