You forget those men served in the U.S. Military for more years than they were in the Confederacy, and several fought in the Mexican-American War. Robert E. Lee was Superintendent of West Point, and also fought in Mexico.
Not the case for some. John B. Gordon and Edmund W. Rucker never served in the army prior to going into Confederate service. Leonidas Polk served for 6 months after graduating from West Point, resigned his commission and became a minster.