The mechanism controlling vortex shedding from rectangular bluff bodies