Certainly it all varies location to location. I'm unaware of a regulation like you suggest in CA, and don't believe there is one - where did you grow up?
It's certainly the case that it's better and safer to ride (or drive) where you have space to stop, and that that should be preferred when picking a route or building a road, but other concerns can sometimes wind up dominating.