Educational attainment is correlated with lots things. For example, there is a strong correlation between your parents' wealth and your educational attainment. Your argument would make sense if IQ were the only thing correlated with educational attainment, but it isn't.