There are some parts in the Bible, where it says "Jesus cast out demons, but did not let them talk, because they knew who He was." Why would He do that?
I mean, if people heard demons saying that Jesus is Lord, they'd believe, and it'd be good, wouldn't it? Why He didn't let them talk then?
"Then He healed many who were sick with various diseases, and cast out many demons; and He did not allow the demons to speak, because they knew Him" (Mark 1:34).
A good question. Suppose you were on trial for robbing a bank, would you want a notorious bank robber to testify at your trial as your witness? He could be at the stand and "I know her very well! She would never rob a bank!" What becomes the problem? The jury wonders why you hang around with evil bank robbers. Besides, who can trust the word of a bank robber? He is just as likely to lie to protect a friend.
Why would Jesus want the testimony of demons? Demons don't generally tell the truth. They make people's lives miserable. You never know, the demon might just be providing cover for one of their own.
The answer is that unclean spirits were not a credible witness and Jesus did not need the support of evil to prove who he was.
But there is another point to consider: Why were the demons so eager to announce the one who is their enemy? You would expect a demon to be trying to undermine Jesus, not support him. Hence, there is something more subtle going on.
Satan and his followers know that Jesus is there to seal their doom. Satan has the world under his control, but Jesus is coming to rob him. "Or how can one enter a strong man's house and plunder his goods, unless he first binds the strong man? And then he will plunder his house" (Matthew 12:29). I suspect that the evil spirits thought that if they could remove Jesus quickly from the scene, he would not have time to accomplish his tasks. They were playing a game of reverse psychology. If they announced Jesus, then it would appear that he had the support of evil spirits. If he was revealed before he was ready, people would push him into ruling them or they would turn against him. Either way, the evil spirits probably saw it as a win on their part. If nothing else, Jesus clearly didn't want his role revealed, so the spirits were out to do the opposite.