Architecture/History question - corridors

Having recently visited Hampton Court Palace and Kensington Palace I was reminded that such older buildings were built without corridors. Instead they have interconnected rooms. Inconvenient if the Queen’s Bedchamber is between you and where you want to be.

Does anybody know when corridors became common and what prompted their inclusion. I am guessing that maybe it was the introduction of efficient artificial lighting which made windowless passages practical.

Any info/links would be appreciated.

If I remember my history class correctly (this is from what I remember from lecture notes a year or so back…don’t ask for a cite, I’m not going to go tunnelling through boxes of old notes to find the exact date my prof. told me this)…

Corridors and hallways began to spring up in the High Victorian era (late 1800s, early 1900s). This happened partly because of the advent of electric lighting, but also the Victorian emphasis on separating public and private spheres (thus avoiding having to stomp through the “Queen’s Bedchambers”).