In your case, the California officer was within his right to ask to see your ID, you could have lawfully refused, but what you did instead, giving a false name, was a crime. Your neighbor also could have refused to provide her name and ID, but chose not to. There is an argument that the officer had no reason to run your neighbor's information simply for being in public as a spectator, but that is for her and her lawyer to discuss, which she should certainly hire.
The US Supreme Court has explained that “an officer may not arrest a suspect for failure to identify himself if the request for identification is not reasonably related to the circumstances justifying the stop.” Hiibel v. Sixth Judicial District, 542 U.S. 177 (2004). That is, unless the state has a specific statute requiring people to provide ID to law enforcement upon request, which California does not have.
So, in short, unless the officers have reason to see your ID that is related to a reasonable suspicion of YOUR criminal activity, they cannot force you to provide your ID. It seems, based on your description that they had no reason to believe you were involved in criminal activity, and thus could not legally force you to provide ID.
But, the Supreme Court has also explained that “a police officer is free to ask a person for identification without implicating the Fourth Amendment.” (See INS v. Delgado, 466 U.S. 210, 216, 104 S.Ct. 1758, 80 L.Ed.2d 247 (1984).) So an officer may lawfully request that people produce identification, but that does not mean the officer can arrest a person for refusal to do so unless criminal acts are suspected.
All my comments here are intended for general legal purposes. None of my comments here establish an attorney-client relationship with anyone. None of my comments should be relied on in taking legal action without first consulting an attorney.
My colleague has provided you with existing California and Federal law regarding producing identification to police.
In summary, law enforcement has the right to request identification, but you as a citizen also have the right to refuse. A police officer does not have the legal grounds to arrest someone for not providing ID, if the request is unrelated to the circumstances surrounding the request.
They can ask for it, as the other attorneys have mentioned. You can refuse to give your name, but definitely do not give false information.
Please do not take my answer to be legal advice that would establish any attorney-client relationship. Please take it as a general response from my own experience in response to your question. I hope you find it helpful.