Unfortunately, the amount of calculations required for units to change their targets mid-attack would bog things down too much. Despite one or two generations of devices becoming unable to play the game after release they still have to make it playable to the broadest range of devices possible. That's why we get 'experience' instead of more troops from barracks. The decision to make strongholds and troop cards as omnipresent as they are kneecapped better AI/more troops years ago.
Honestly, the devs haven't paid the slightest of lip service to improving AI in years either. Besides, in your example, how would units react to the silo, mortars and sniper towers? Would they try plowing through five wall sections to get to them? I share your frustration. Hell, it annoys the hell out of me that troops zero in on bastions and dance around in the rubble because instead of calculating them as one 80,000 hp piece it still considers each section individually. I'm afraid it is what it is at this point though.