The packing is loose in this sketch and the seal is ineffective. In the Java applet, you see the nuts turning down to squeeze the packing against the rotating shaft. Another type of seal has no packing. It is a labyrinth with plates attached to the shaft turning inside plates attached to the outer casing. The fins on the shaft are blue in the next figure.
Gas flow back and forth thru the torturous space dissipates pressure.
There is inherently some leakage of gas, but it can be negligible. Commercial fermentations are operated at slightly elevated pressure, so leaks will be outward. As you experiment with the spacing between fins, note that wide spacing would offer little resistance to flow of gas. Close spacing might present construction problems and could have high resistance. Because the computer display has pixels and odd numbers do not permit half-way between, odd integer numbers do not space the fins evenly.