We had segregated schools in the first place because Americans used to own slaves, at least the richer ones did. And after Abraham Lincolns emancipation proclamation, slaves slowly became freed. They were their own people. But many whites didn’t like that. They feared that. The white people did not like that black people now got to live with them as their equals. So they made it so there were separate drinking fountains, separate tables, and separate schools (among many other separate things)
Overall it was white people being afraid of or not liking that black people would have equality