It might in theory, but there is a mandatory visual check in California and if they see a non-factory cat without a CARB # you fail automatically and it goes into the computer. If they don't see it, and if the cat passes, well........
Here are all the regulations. Read them over and you decide what's worth the risk and what isn't.
But illegal as hell, yes, that part is certain.
CA EMISSIONS LAWS ON REPLACEMENT CATS