I thought it had to do with the training as I've heard about foreign pilots getting their FAA CPL for going through UPT. I did look it up and it looks like both are true:
(h) Documents for qualifying for a pilot certificate and rating. The following documents are required for a person to apply for a pilot certificate and rating:
(1) An official U.S. Armed Forces record that shows the person is or was a military pilot.
(2) An official U.S. Armed Forces record that shows the person graduated from a U.S. Armed Forces undergraduate pilot training school and received a rating qualification as a military pilot.
(3) An official U.S. Armed Forces record that shows the pilot passed a pilot proficiency check and instrument proficiency check in an aircraft as a military pilot.
(4) If a person is a military pilot in the Armed Forces from a foreign contracting State to the Convention on International Civil Aviation and is applying for a pilot certificate and rating, that person must present the following: