I don't know how much you know about Tanks......
Tanks are in working condition even if the optics are damaged or even destroyed. In fact, Tank have very high tolerant of damage, I can take 2 direct hit from the front and the tank can still drive and fire.
That's because tanks gun while complex, but it is a very basic design, you have a barrel, you have a beech, you have your primer, you have your round, and finally you have your trigger. It's basically works like a firearm, as long as you can load the round in, and ignite the primer, and the barrel is not obstructed, then your main gun WILL fire.
Engine is a more complex issue, it involved an engine and a gearbox, that too cannot be easily destroyed, and even if it did, you can still salvage or repair it
So basically, when you see most of the tank they capture have no external damage at all, it usually mean they are in functioning order, anything that make the tank cannot function would most likely showing the damage on the outside