But it is realistic

Tanks are natural bullet magnets for everything - if YOU were in the place of poor no-AT-weapon-equipped schmuck, would you just sit idly or would you try to atleast fire with your rifle, hoping the crew of the tank may get distracted enough (or convinced of strength of defense) to withdhraw?

It would be hard to count how many infantry lives were saved by mere presence of friendly tanks soaking up rifle and MG fire, but I'm convinced it'd pretty large number
As for turning weapons off, just click on the weapon in Unit Informations Screen.