Your answer is contained within the passage you quoted;
He was not permitting the demons to speak, because they knew who He was - Mark 1:34
He didn't want the demons revealing His identity. Why? Because it wasn't time for Him to die yet. Every time the Jews began to catch on to the idea that Jesus was the Son of God, they sought to kill Him.
His desire to remain discreet until the appointed time was not limited to silencing demons;
Jesus stretched out His hand and touched him... immediately his leprosy was cleansed. And Jesus said to him, “See that you tell no one" - Matthew 8:3-4
Then He warned the disciples that they should tell no one that He was the Christ. - Matthew 16:20
After the transfiguration, this is what Jesus told His disciples:
- Tell the vision to no one until the Son of Man has risen from the dead. - Matthew 17:9
When the time was right, however, Jesus made His true identity clear, thereby provoking the Jews to crucify Him;
Again the high priest was questioning Him, and saying to Him, “Are You the Christ, the Son of the Blessed One?” And Jesus said, “I am"... Tearing his clothes, the high priest said, “What further need do we have of witnesses? You have heard the blasphemy; how does it seem to you?” And they all condemned Him to be deserving of death. - Mark 14:61-64