Yeah, you are right. Having ICs and AA guns be indestructible doesn’t make a lot of common sense. However, I think part of it is to represent the spoils of capturing certain territories, and to make the original owner want to defend that territory a little better.
For the Attacker, you fought hard to win this territory, so now you get a new IC to pump out units right here rather than having to truck them in from your capital.
For the Defender, you have to defend this territory a little harder or your enemy will have an IC much closer to your capital.
At least in the Global 1940 rules when Major ICs are captured, they are reduced to Minor ICs which represents the lesser capacity available to an invading force. Example: A German factory wouldn’t produce as much for the Americans as it would for the Germans.
Some games do have “scorched earth” rules, like The War Game: World War II, where you can remove factories under imminent attack. I think it costs you 1 infantry unit in that territory (i.e. if you have 3 infantry defending, you can use one to destroy the factory and leave 2 to defend the territory). I’m sure there are others, I’m just not familiar with them.
Plus, you can always make a house rule allowing for the destruction of ICs to keep them out of enemy hands. Of course, that could be a double-edged sword. Say the invader’s attack goes horribly wrong. Now you have to either purchase a new IC there or simply do without.