A P365 is "legal" to be owned in California, but a California resident cannot merely buy one from an FFL-dealer, unless the buyer is exempt from California's roster.
"Legal" and "roster" are different things.
"Legal" and "roster" are different things.