His parents said this because they were afraid of the Jews. For the Jews had already determined that anyone who confessed Jesus as the Christ would be put out of the synagogue.
KJV
These [words] spake his parents, because they feared the Jews: for the Jews had agreed already, that if any man did confess that he was Christ, he should be put out of the synagogue.
ASV
These things said his parents, because they feared the Jews: for the Jews had agreed already, that if any man should confess him to be Christ, he should be put out of the synagogue.