It was forbidden to educate slaves because the white men were afraid that by educating them the slaves would get smarter. If they got smarter they might figure out how to get slaves out of their predicament. So the idea was to keep them stupid basically so they cannot revolt against the white men.