There can be two reasons why your bathroom sink smells bad.
A buildup of bacteria can be one reason that your bathroom sink smells bad. This can be caused by flushing fat and other food products down the drain. It can also be caused by hair buildup in your drain.
The second reason your bathroom sink might smell bad is from the p-trap which is in your plumbing. The p-trap is a u-shaped pipe that connects to your sink. From the p-trap, one pipe will go to the sewage drain and the other to the roof of your property which lets any sewer gas vent outside. The p-trap stores a small amount of water which prevents bad smells from coming back up through the sink. If the p-trap is damaged, never installed, or improperly installed can lead to a bad smell.