Sink piping sloped in such a way that keeps drain water in it can lead to a smelly sink drain. This can happen when a combination of situations occur.
Lots of homeowners have a garbage disposal, but there are folks that either don’t use it or don’t have one. So they are left to let debris run down the sink strainer. The strainer allows only small food particles to pass through and run down the drain. This is fine as long as the slope of the drain is correct and allows the water and debris to flow as it is designed. However, I have seen cases where the sink piping will elbow over to the main pipe, but the vertical drain pipe from the strainer (the tailpiece) is left slightly too long. This can cause an uphill rise in the horizontal pipe which will cause water and food debris to remain in the pipe…to rot and spoil.
The fix is to cut the tailpiece slightly shorter to the point that the rise in the horizontal section of drain is removed. In this way there is no pocket for the drain water to sit and “ferment” and smell up the room. The drain should be gravity fed and not have any uphill rises in the piping.