The thing is that the remains of food, which are certainly present on the dishes, overnight react with each other, begins the process of rotting. All of this combined, of course, leads to an unpleasant smell.
It is vital to realize that in dirty dishes overnight bacteria multiply, and even if you wash it until visually clean, there’s a possibility that some trace elements and germs will remain on the surface.