Generally, you clean your bike after every couple of rides, so you can work on it. So beach riding doesn't hurt the bike from rust at all. Chain and sprockets do need cleaning if you're not riding every day. Air cleaners are no problem, unless you dump it in the sand.
Nothing like feetup, full powered, 45 mph broadslides on low tide beaches.
I know they closed the SanBernadinoMountains to all dirt riding, so that's a huge takeaway.
I saw civilization taking over around 1982, so I gave up MX for windsurfing, which still provides most of the thrills without the penalty of the spills. I have countless windsurfing boards, sails, and rigs. Most years, I windsurf over 150 days, and I've been to Baja, Texas, Oregon, and Hawaii lotsa times.