Mark seems to be chock full of this very thing. In just the first 8 chapters in our 5x5x5 reading it has happened numerous times (1:34, 1:43-45, 3:11-12, 5:42-43, 7:35-36, 8:30). Jesus not only commanded the demons to be silent when they were revealing his true identity, but he also commanded the same thing of those he had healed, and even his own disciples! That last point is perhaps the most shocking, but there's a clue to why in the very next verses, so let's look at them in context:
And he asked them, "But who do you say that I am?"In some of your Bibles, Mark 8:30 and 8:31 are broken up by a new paragraph and perhaps even a new paragraph heading. In my Bible it reads "Jesus Foretells His Death and Resurrection". This breaks your flow of thought and you kind of look at it as a new train of thought. But these paragraph headings were not in the original manuscripts, and when you take it out and read it as we did above, the answer begins to emerge.
Peter answered him, "You are the Christ."
And he strictly charged them to tell no one about him. And he began to teach them that the Son of man must suffer many things and be rejected by the elders and the chief priests and the scribes and be killed, and after three days rise again. And he said this plainly. And Peter took him aside and began to rebuke him. But turning and seeing his disciples, he rebuked Peter and said, “Get behind me, Satan! For you are not setting your mind on the things of God, but on the things of man.” (Mark 8:29-33 ESV)
Jesus did not want his identity revealed on a large scale because this would inevitably draw a large, faithful, and powerful crowd (both in political and military terms). This would have made it almost impossible for Jesus to "be rejected by the elders and the chief priests and the scribes and be killed". This explains, at least in part, why Jesus didn't want the demons saying who he was (and why they would want to). This explains why Jesus ran when the crowds tried to make him king by force (John 6:15). This explains why Jesus at times delivered such crowd-thinning messages as "Unless you eat my body and drink my blood, you have no life in you" (John 6:53).
Jesus had to die because the biggest problem for the Jews wasn't the oppressive Roman rule, it was their own sin. The Jews' greatest need wasn't a king, wasn't a military leader, wasn't someone to win freedom from big, bad Rome. The Jews' greatest need was an innocent sacrificial lamb to pay the debt of sin for them and the rest of humanity. And that wouldn't come about if Jesus' popularity grew to the point that he became untouchable.
For further reflection see: The Balancing Act of Jesus