Danny - AAFES is the department of the US DoD that runs the old Post & Base Exchanges - Army & Air Force Exchange Service. I believe it was founded before WW1, so would have run the PXes that you visited. It's run as a company, but is a department of the DoD. There are no stores called "AAFES", they were either Post or Base Exchanges - Army or Air Force, but now all branded "Exchange". People still call them the PX though. Or BX.
They have their greatest value in providing US goods overseas. In CONUS, there are sometimes better deals in commercial stores. However, AAFES Exchanges are tax free, even in the US.
Now the really good deals are to be had at the Commissary - those are subsidized by Uncle Sam.