PX stands for Post Exchange and was chosen to differntiate it from BX (Base Exchange) used on Airforce bases.
"In the US Armed Forces, BX is a common name for a type of retail store operating on United States military installations worldwide. Originally akin to trading posts, they now resemble department stores or strip malls.
Known as the Base Exchange (BX) on Air Force bases, they are also referred to as a Post Exchange (PX) on Army posts, Navy Exchange (NEX) on Navy installations, Marine Corps Exchange (MCX) on Marine Corps installations and Coast Guard Exchange (CGX) on Coast Guard installations."
"The PX often appears in the Beetle Bailey comic strip from the 1950s.
In the television show King of the Hill, character Bill Dauterive works as a barber in the "Post Exchange Barber Shop" on the fictional "Fort Blanda" Army base.
Tokyo PX is occasionly mentioned in the TV version of M*A*S*H by soldiers given leave from the Korean War. Japan had served as a supply base for the UN forces during the conflict."
https://en.wikipedia.org/wiki/Base_exchange