NYC has a law that for a room to be legally called a bedroom, it must have a window that's not on a lot line. I can't believe California doesn't have a law like that.
The NYC law doesn’t actually accomplish much though. The last time I lived in NYC, probably 4 years ago, I was in a $3k/month studio and my legally mandated window faced into the interior well of the building, maybe 50x50’ wide and probably 40 stories deep. No plants, only the palest hint of sunlight.
That's a pretty common building code across the US for typical residential units. Hotels and the like get around it by offering multiple avenues of escape in the event of an emergency.
I once got a deal on a 1600sqft apartment in a Maryland row home. It was listed as a 1-bed, even though it had 2 more rooms that were as big as the bedroom, but couldn't legally be called bedrooms because no windows. I believe the codes required you couldn't have more people living there than could live in 1 bedroom.