With the defendant?
Why would it be? My clients have busy lives and careers so they would rather NOT attend court unless it was absolutely necessary. I can't imagine why a defendant would WANT to be in court on an unnecessary appearance except maybe someone just sitting in jail and wants a field trip. If you don't want to be in jail then bond yourself out and, if you can't, ask your attorney about the possibility of a bond reduction.
Short answer: no, what you describe is not illegal nor is it unethical.
Public disclosure
Does California have a law to the effect that one can ask public (State) entities (like state schools, etc.) for disclosure, submission of required documents and things?
What is the law and how do you go about requesting it?