It's a combination of the sawdust covering the waste and the microbes present in that sawdust. Your local waste water treatment plant may use biological odor control where they use a large container of wood chips and things populated with bacteria which they feed with fertilizer to maintain a maximum population. Odorous air is drawn off areas where it is the worst (like the inlet works, screening, and EQ basins) and pushed through this container where the bacteria feed on the sulfurous compounds which cause the smell. A similar process occurs in the sawdust though I'm not sure to what degree the sawdust itself absorbs odors, it may be substantial, or it may not.
With a good layer of sawdust on top, I have kept buckets for several months with no problems. In fact, they grew mushrooms.