Well yes, everyone has a story, also “bedpan”.
That is a prosaic but indispensable invention so long ago, but it has remained in vogue until the late twentieth century.
The woodcut reported in photo shows a usual scene, almost daily, of Middle Ages: a lady down the contents of the pot into the street, heedless of the fact that just under his windows there is a group of singers.
Since then, the homes of totally devoid of Toilet as we know them today, It was established habit to the needs in the chamber pot and then empty the next morning according to this mode.
Without worrying too much if the road was empty or if, instead, someone happened to be passing (Photo gives: focus.it).