Decoupling the rotation of stars and gas – I. The relationship with morphology and halo spin