Forget code for the moment, and examine this, clipped from another site:
4 in. soil pipe offers a more efficient way to dispose of solid material, but the introduction of low-volume toilets and other water-conserving measures, significantly reduces the level (height) of water in the pipe, resulting in significant clogging within the soil pipe. In new construction, the 4-in. pipe is now too wide for long, horizontal runs (especially between the home's main vertical drain, or stack, and the street).
3-in. soil pipes raise the flow level in horizontal runs and, as a result, suffer fewer clogs.
4 in. soil pipe offers a more efficient way to dispose of solid material, but the introduction of low-volume toilets and other water-conserving measures, significantly reduces the level (height) of water in the pipe, resulting in significant clogging within the soil pipe. In new construction, the 4-in. pipe is now too wide for long, horizontal runs (especially between the home's main vertical drain, or stack, and the street).
3-in. soil pipes raise the flow level in horizontal runs and, as a result, suffer fewer clogs.