Picking up trash and disposing them in a good manner keeps the environment clean. If there were piles of trash everywhere, the whole place would not only smell awful, it becomes a breeding ground for diseases too.
Pests like roaches and rats tend to inhabit dirty spaces and they carry with them many harmful diseases. The Black Death, which swept across Europe during the 14th century, was responsible for the death of more than one third of Britain's population. The main culprits responsible for the Black Death were the infestation of rats roaming around in every street, home and nook and cranny because there was no system to dispose refuse back then. People threw their trash out of the windows and so the streets were strewn with litter and stepped on by passer-bys.
Therefore, picking up some trash and disposing them properly would ward off pests and keep the streets disease free.