That's crazy! I was almost going to call BS on this bit of paranoia, then I saw you lived in California, and it all made sense. I can't imagine anything like that ever happening around here, you'd end up with a lot of well-aerated contractors.
We have no law here specifically prohibiting one from going thru trash, but we do have "movable property" laws and privacy laws that prohibit one from opening any closed trash bag or can, and many have been cited for doing so. Basically, if an item is left in the open on the curb, the right to privacy is forfeited, and the item is up for grabs. But as soon as it's in a closed bag or a can with a lid, privacy laws apply. This can vary, state to state.
I believe the intent is to allow one to set a window air conditioner, or old end table they're no longer using, out at the curb for anyone to take, but still protect the privacy of those putting trash out in closed bags or cans.