that's an surprisingly interesting subject.

short answer: state laws. longer answer is it's done with a patchwork of federal and state laws, partially to avoid calling a permit a "permit" or saying "gun registry" out load for politically charged reasons.

without editorializing on the morality or pros/cons:

- (as mentioned in the article) ATF Form 4473 is federally required for transfers between people who do not reside in the same state. interstate commerce and all that. this includes a NICS background check and must be performed by a dealer holding a Federal Firearms License or an "FFL".

- this form is not a joke. answering "creatively" is a felony. this is what hunter biden did, for example. you can see an example of the form and the sort of questions here [1].

- this, combined with the background check, definitely has aspects of a "permit": you pay a fee and some agency "permits" the transaction (or denies it). in many states, this is only required for interstate transfers though; doesn't count swap meets, selling to a friend, etc.

- on the surface, this is not a "registration" scheme and the records of the transaction are stored privately by the dealer in the Dealer Record of Sale (DROS).

- but federally, this also backs into a pseudo-registration system because the ATF can and very much does, inspect theses records whenever they want. and when the dealer goes out of business, the record ownership reverts to the ATF. one can pick and choose how much you believe that the government does or does not retain any records of the background check and transaction, and how good the security of any of these databases they may or may not have is.

- in california, starting in the late 1990s (1998, iirc), requires all handgun transfers to be handled by an FFL. since the FFL follows the process above, and is also licensed by the CA DOJ, there are also much more overt requirements, such as 11106 PC [2], to explicitly maintain a registry. basically, ca piggy-backed on to the federal process for interstate gun transactions for intrastate sales as well.

- starting in 2014, all gun transfers, not just handguns fell under this process. in 2022, certain "precursor" parts fall under this as well.

- in addition, the obvious workaround of "buying a bunch of guns as an AZ resident and moving to ca later" and things like that are also blocked by various ca laws: you have to register your guns when you move into the state (if they are ca legal, which is another very complex patchwork of laws).

- so basically, in ca, state law has closed nearly any loophole for obtaining or bringing a gun into the state without going through an FFL and both the CA DOJ and ATF are involved for any gun purchase. nowhere does it call it a "permit" overtly, but defacto that is what it is. federal law also tries very hard to not say "gun registry" out loud while doing it's best to make a defacto registry. ca skipped that and just says "sure we have a gun registry".

the only way to legally have a gun that isn't registered this way in CA is to have owned it in the state before 1998 (handgun) or 2014 (long gun).

so CA doesn't have a "gun permit" law. it just passed some state laws that made you use a particular federal process that isn't technically called a permit, but effectively is, for all gun purchases as of 2014.

and CA doesn't have a "gun registration" requirement law. perfectly legal to own a gun that isn't registered. as long as you've owned it in the state for 25+ years. there's technically no requirement to have your gun registered once you own it. but, of course, there's no legal way to obtain one otherwise.

an interesting aside, what happens when bureaucracies maintain big computerized databases? in 2022 the database was leaked [3].

[1] https://en.wikipedia.org/wiki/Form_4473
[2] https://leginfo.legislature.ca.gov/faces/codes_displaySectio...
[3] https://news.ycombinator.com/item?id=31910724