Origins of confinement in pure gauge theories