We don’t need California. They need us. However, the new Republik of Kalifornia could provide a Pacific coast launch point for a foreign invasion force (not just those south of the border) that would be necessary for land forces to attack the USA. Countries, such as China and the Norks, that lust over the land and natural resources of the USA.
The next war, if there is one, between major world powers is not going to be a land invasion. It will be nuclear, which is why it is unlikely. The threat isn’t China, it’s Islam in our midst. Granted, the little nutball in NK might try to launch a nuke our way, but CA isn’t going to have anything to do with that.