HelloCustomer Thank you for coming to Just Answer and allowing us to help you with your question. Yes, it is legal for the state of California to request a copy of your federal tax return. All states use or compare data from your federal tax return in figuring your state taxes. Most of the more computer-literate states can get this information automatically, particularly if you electronically file your return; but many states require the taxpayer to file a copy of the federal return with the state return when filing by mail.
Hope this answers your question. Please let me know if I can provide more information.