It's not California that made this rule - it the California Department of Parks & Recreation (aka California State Parks) and the National Park Service. They only allow dogs on leash and on "paved roads" - no hiking trails and very limited beaches. Sometimes, the reason makes sense like with Ano Nuevo and the elephant seals (don't want dogs disturbing them), other times it makes no sense like with Calaveras Big Trees (because a dog might get bit by a rattlesnake on the trail - but your 2 year old daughter is fine with that risk).
The worst is that some of the state parks are more dog friendly and may have no problem with your dog on the trail (ON A LEASH), but their website, brochures, posted rules, etc., say "no dogs on trails" - so you can't know before you go if they will have a problem with it or not. For beaches, it is much clearer - unless it says "dogs allowed", that beach is NOT dog friendly.
For camping where dogs are not allowed on trails, beaches, etc., many will also not allow you to leave your dog unattended at the campsite. That includes leaving them inside your RV while you go hiking or to the beach. If you get in trouble for it is dependent upon a lot of factors: do your dogs bark when you're gone, do your camping neighbors like you, does the camphost/ranger like you, do you follow all the other "dog rules" religiously (like picking up after them, keeping them on a leash, etc.), is the dog-friendly ranger on duty throughout your entire stay, or will an anti-dog ranger come on duty first thing tomorrow. And then there is the issue of generator times - are they allowed during the times you want to leave the dog in an air conditioned RV or are they only allowed for a couple hours in the morning and again in the evening.
So, for beaches, you can check out
www.parks.ca.gov and see which parks will allow your dogs on the beach and which won't. Check to see if there are local beaches (city/county owned) with more dog-friendly rules.
For other camping, the easiest solution is to skip the state parks and go to National Forest and/or Corps of Engineers campgrounds. These most always allow dogs to go on the trails and hang at the water. At lakes, etc., they often have a specific beach or picnic area or trail where dogs are not allowed - that is posted quite clearly. However, there will be the rest of the shoreline, trails, etc., where your dog IS welcome.
I always camp with my two dogs. I do pretty much the above. First, the entire purpose of taking my dogs with me is because I want to let them enjoy the lake, river, creek, trails, etc. I don't want to lock them in a 60ft jail while I go out swimming, hiking, etc. I also don't want to get all the way out to a campground that is rumored to be dog-friendly only to find out that the staff changed or an incident occurred and they are now very strict about the rules. And I don't want to spend my stay sitting in a campsite because my dogs aren't welcome anywhere else.
In return for these places with dog friendly rules, I willingly pay any additional fee for the dogs (national forests often have a $2 per night per dog fee), I pick up after my dogs, I always keep my dogs on their leash(es), I make a concerted effort to stop my dogs from barking if they get going (happened a lot when we started, now not so much), and I am considerate towards other campers and move my dogs off the trail when they pass, keep them at my side while at the beach (years ago I had them tied in the shade while I swam in the lake when another camper came through with her little dog and walked right between my dogs and me, my Moose-dog had been attacked multiple times by little dogs and felt threatened by hers and snapped at it. So no more separation where someone can cut between us and no more potential incidents).
From what I've experienced and have been told by camphosts/rangers/sheriffs/other campers over the years, this exchange of good behavior and dog-friendly camping has been a success. I have not have any run-ins with others over my dogs and those I have plenty of places to camp and hike and swim and play outdoors with my dogs.
Oh, and while National Parks don't allow dogs on trails, other places in the National Park System do allow it. Mono Lake and Bodie State Historical Park are co-run by California State Parks and the federal system and therefore they allow dogs (on leashes) to visit. My dogs visited both a while back and had a great time.

