In general, the Marines don't care what your degree was in (I am sure that there might be exceptions although I don't know of any). Your MOS (military occupational specialty) could dictate a longer career obligation (pilots, for instance). In the end, a longer USMC career is a function of personal performance, world events, job assignments, Commanding Officers (reporting seniors and the fitness reports they write), physical endurance (holding up to the wear and tear of the job), career choices along the way, personal choice and a whole lot of LUCK.
I was a business major and was an Infantry Officer. I don't recall too many examples but within my Company I remember one guy had a degree in meteorology and another studied geology and a third had a chemical engineering degree. I don't believe any of us served more than 6 years and all left by personal choice.