That’s not the issue. Their airframe lives are not even close. We still built these into the 90s. In fact we dumped many brand new ones into the ocean to create an artificial reef or so they say.
The actual purpose was to clear the way for the A-12.
The F-35 moonpig and the super insect can’t replace the A-6.
A responsible government would have updated some electronics on those fine machines and been done.
But politicians and procurement officers have careers to think of.
AIR by that time the A-12 was history, the A-6G rewinging (and the F-14D) were deep sixed so there would be goodly production run for the F-18E/F