An LEO in California isn't going to plug into your OBDII. But, if you're stopped for an unrelated reason, and the officer suspects that your car is illegally modified, he can ask you to open your hood. I was stopped in my Mustang for a friendly chat about not having a front license plate. The officer said "hey, bro, let's take a look under that hood...... Wow, lots of shiny stuff, that looks expensive!" I could tell he was looking for obvious stuff, like open breather instead of a PCV, long tube headers, but he didn't mention anything. I had a stack of CARB EO documents if he'd asked for them, but that was it. He didn't crawl under the car to see if I had stock cats. I half expected to get a letter sending me to a smog referee station, but nothing came of it.
Smog regulations, like now requiring a stock tune, are a deterrent to people who realize that if they fail a smog test, they can't get their car registered. I'd be more worried about being pulled over for an expired plate than I would a modded car. Knowing that I'd fail a smog test is enough of a deterrent to me to not really want to change my cat pipe. Similarly, rolling around in my van with an engine light and a P0420 code is enough to get my off my butt to fix it before the smog test so I can register the thing for another year.