The church was responsible for social policy and welfare and also carried out some functions of the state. Its clergy conducted and registered marriages, baptisms and funerals; they delivered education to children and distributed charity to the poor.
Well, to start, the Supreme Court could have ruled differently in Plessy v. Ferguson.
In Plessy, the Supreme Court condoned the practice of "separate but equal" making it permissible for the white south (and north) to create discriminatory practices.