And there's no reason to keep it around for low tech wars - if we need a dedicated aircraft to destroy mud huts we'd be better off with something cheap and easy to maintain, like Embraer's Super Tucano II.
Afghanistan is a hard nut to crack due to being landlocked, surrounded by enemies, and with primitive facilities. B-1s do well in this situation since they can fly out of Diego Garcia, carry a shit ton of fuel, and munitions, and have a crew that is used to long duration flights. Once it was equipped with the AN/AAQ-28 Litening pod, it really came into its own for providing CAS.
People also misunderstand what CAS is. CAS stands for Close Air Support, but doesn't mean the aircraft providing it has to be close, but that the munitions are hitting close to the FEBA (where our troops are).
But keeping all that old hardware flying...
Even if this is entirely true, moral goes a hell of a long way on in the army as does the fear this creates with the enemy.
That said I was of the understanding the A-10 was very effective for supporting troops in areas like Afghanistan and similar low tech ground wars. The real issue the Air Force are tasked with protecting the country in the case of a 'real war' with more modernized opponents like China or Russia. In this case and A-10 is old tech and wont deliver much in terms of defense capability hence their lack of interest in maintaining/upgrading it.