Federal courts have the ability to decide cases that are based on violations of California state statutes. The complaint did not need to be changed in order to add cites to the US Codes -- which may not even apply to begin with.
Without seeing the papers, it is impossible to know why summary judgment was granted. Obviously, the judge did not feel the opposing party's materials raised a triable issue of fact. The lack of citations to the US Code, however, was almost certainly not a factor in the court's decision.
The plaintiff lost, apparently, because the judge found that the evidence presented by the plaintiff did not create any factual controversy about the application of the law the court found to be persuasive. The fact the case was removed and the pleading was based on CA was in no way the problem. Federal courts have "concurrent jurisdiction" to hear and determine issues of state law. In fact, federal courts are required to follow the substantive law of the state in concurrent jurisdiction cases.
Without more, it is impossible to give any more specific guidance about why the motion for summary judgment was lost.
Good luck to you.
This answer should not be construed to create any attorney-client relationship. Such a relationship can be formed only through the mutual execution of an attorney-client agreement. The answer given is based on the extremely limited facts provided and the proper course of action might change significantly with the introduction of other facts. All who read this answer should not rely on the answer to govern their conduct. Please seek the advice of competent counsel after disclosing all facts to that attorney. This answer is intended for California residents only. The answering party is only licensed to practice in the State of California.