Beverly Hills is literally a city. It is autonomous from the Los Angeles city government. It has its own government and its own laws.
And do please show me where the L.A. homes under $400k are. There weren’t L.A. homes that cheap outside of Watts when we lived there over a decade ago and I’m not even sure about Watts.