I speak to many people who call themselves capitalists and many of them say they are against public schools. Many capitalists believe that vouchers should be given to parents and parents themselves choose which school they send their children to.
Let us define capitalism as a system whereby individual rights are protected. Capitalism ensures that nobody has the right to coerce others to do anything they don't want to do. Capitalism ensures freedom.
The problem with the voucher system is that parents choose for their children. The child does not choose himself. Already, the child is denied freedom and is coerced into a school by his or her parents. This lack of choice and obvious coercion already goes against the principles of capitalism.
However, many believe children are an exception because they do not have the ability to decide what is best for themselves. Hence parents make decisions for them. The child is the property of the parents.
The problem here is that parents can make poor decisions because e.g. they are lazy, unintelligent, or they don't care about their children. Let us assume that a particular parent wants to teach his child sex education and the way he teaches this child is to bring this child to a hands-on sex school that encourages the child to actually have sex with a prostitute. This would be fully legitimate under a pure capitalist system since the child is the property of the parent and the parent makes the decision of what is best for his or her child regardless of social or collective morality. Thus capitalists support child rape. If someone were to say that a particular capitalist who wants to send his child to a sex school is wrong, then the accuser can be labeled as a socialist who wants to impose his morality on others. According to capitalist principles, the father choose what he wants to do with his own property and therefore he choose how he wants to educated his son or daughter, which means he can have sex with them if he wants to educate them about sex.
If we assume that a child is better off being reared according to the morality of the community rather than the morality of whatever pervert parent he might have, then we must have public schools. Public school curriculum can be set democratically.