The state has nothing to do with a city requiring you to get a permit from the city to buy a pistol in that city.
No permit is required to buy a pistol in Arizona, just fill out the ATF forms, the gun store calls your info in, and when you are cleared you go pick up the gun. CCW permit holders fill out the ATF forms, show the CCW, and leave the store with the gun.