So then what protection do the liberties of minorities have against Democracy?
At the state level, all persons are guaranteed the rights secured by the first eight amendments to the Constitution. There are a variety of other guarantees, such as the prohibition of bills of attainder and ex post facto laws, contained in other parts of the Constitution.
The KKK didn't support the law because they love public schools. This law was a very obvious intent to deprive Catholics of personal liberties, which included both free exercise and liberty in general.
The intent of any law is irrelevant; only the effect thereof is important. Some laws are driven by principles, others by politics; some by tolerance, others by bigotry; some by moral views, others by convenience. However, bad intentions do not violate the Constitution.