When a toilet flushes or a stack carries a slug of water, air must move to fill the space behind it. Vents supply that air. Without adequate venting, negative pressure siphons water out of traps — and with it goes the barrier holding sewer gas out of the building.
Gurgling fixtures and intermittent sewer smells are the classic signs of a venting problem or a blocked vent.