Active Galactic Nuclei Feedback and the Origin and Fate of the Hot Gas in Early-type Galaxies