Whenever you look at a pipe draining water down the sewer from your home, you will find one aspect that they all have in common. They will all have a part of the pipe that is shaped like an “S”. This is called a p-trap, and it is there to prevent sewer gasses from flowing back up when there is no water running down the pipe. The shape of this pipe leads to water standing still in the bend, effectively blocking any gasses from flowing back. Sewer gas is harmful to your health, and it smells very bad as well, so you can be thankful that you have a p-trap installed.
Your toilet has a p-trap built into it, as do many appliances that use water, but if this isn’t the case, then the appliance will need to drain its water into a pipe before the p-trap. There is also an added bonus with p-traps since any items you drop down in the sink usually will be retrievable from the p-trap.