Why did medieval people throw their sewage on the street?

The idea that medieval people left sewage in their streets is mythology.

In general, medieval people believed that diseases were spread by bad air, called "miasma," and so they tried to clean up anything that would smell. There were some people or places that were exceptional and allowed smelly messes to accumulated, but they were uncommon.

After the Middle Ages, there were certain social issues that showed decline, rather than the rebirth we associate with the Renaissance. A good example, which is fairly easy to document, is an increase in superstition leading to witch hunts, which only began with the Renaissance, and were illegal for most of the Middle Ages. But research into hygiene produces a similar result. Where medieval people bathed often, people of the Renaissance believed bathing was unhealthy, and so they only cleaned those parts of their bodies that could be seen, and relied on using perfume and changing clothes for the rest; this also is fairly easy to document. Though I find less in the historic record to support it, Renaissance people seem also to have been less willing to deal with issues of sewage than their medieval predecessors. Today, people often take a simplistic view that everything improved during the Renaissance, and so bad hygiene, like witch hunts, is associated with the Middle Ages.

There is a link below to the history section of an article on bathing, which illustrates the decline in hygiene from the Middle Ages to the Renaissance.