Cadets leave after two years because your military commitment doesn't start until your junior year at west point and those cadets decided west point isn't for them, or they are LDS and are leaving after two years to go serve a mission and will return when they finish.