The difference between mathematics and philosophy here is that an undergraduate math degree is considered as the most appropriate training for middle school math educators, whereas there is no obvious career path an undergraduate degree in philosophy leads to.