Before epilepsy was understood to be a neurological condition, people believed it was caused by the moon, or by phlegm in the brain. They condemned seizures as evidence of witchcraft or demonic possession, and killed or castrated sufferers to prevent them from passing tainted blood to a new generation.
I think breaking the illusion would remove the concept of “blame” or vindictiveness from the judicial system, but not punishment. If a cog is broken in your watch, you remove it and get it fixed. You don’t remove it as punishment because the cog chose to misbehave, you do it because it’s necessary to get a fully working clock. Bringing it back to the court example, you put them in jail, not as punishment, but to protect society, rehabilitate, and/or set an example for others.