God is our father, and there is a lot that he understands, but which our minds can’t grasp or get around yet.
When we were about 2 years old, our parents had some good rules for us that we didn’t understand, but they were still good. Don’t suck your thumb. Don’t swallow your toys. Don’t tear the pages of the books. Don’t draw pictures on the wallpaper.
The rules since then have evolved some, becoming more complex as we become complex, but as long as we were children (and adolescents, to some extent), we needed them. As children, we might not understand the rules, so we might doubt them, but as long as we still follow them, we’re safe. The same is true for Thomas. He had doubts, but his heart had not rejected his God or Jesus’ teachings.
When a heretic believes and proclaims fervently that the true religion is wrong in various ways, his act is one of rejection, not doubting. He has gone beyond the act of the child who doesn’t understand his father’s instructions, and has chosen to actually reject those instructions and disobey them.
When a child willfully disobeys his father, his father must punish him for his own benefit. If the child doesn’t understand and has doubts but still obeys, he is being sensible (assuming, as a child, that one’s father knows more than oneself is logical, just as it is logical for us to assume that God knows more than we do) and stays in line with his father’s will. His father won’t punish him for doubting- only for disobeying.
A heretic is someone that espouses false doctrines, though, and/or rejects true ones. This person has gone beyond simple doubting of his Father and has chosen to actually reject his teachings. When this conflict comes to matters involving eternal salvation or damnation, and where it can involve spreading one’s false teaching and leading others from Jesus Christ, very stern measures may be required to put a stop to it.