It was not easy to get into a powerful person's home. Nor do they want to risk receiving who was not of their liking, neither be seen in houses of bad reputation.
The imagination of some "madams" led them to build their brothels in strategic locations, located so that their windows were observable from the private rooms of kings and princes, so that they could choose their concubines unobserved until the worthwhile loot and was summoned to the palace.
London, Paris, Madrid, Rome and all the major cities that hosted dynasties in the past, are full of these examples. In the picture you can see one of them, near a French palace.
When you visit onwards palaces and castles, watch carefully and seek the history of the surrounding houses. All have very similar stories. No webcams, but the human imagination solved the problem. The only drawback is that this technology was back then available to very few and now we all have access to it.