Why did Jesus ask Peter James and John not to reveal that Elijah and Moses had appeared in Mark 9 verse 4?
Mark 9:9 - Now as they came down from the mountain, He commanded them that they should tell no one the things they had seen, till the Son of Man had risen from the dead.
Jesus didn't command them not to tell anyone what they had seen; He commanded them not to tell anyone YET. It was quite common for Jesus to teach his "inner circle" something that they were not to proclaim until later; after either His resurrection or ascension.
John 16:4 - But these things I have told you, that when the time comes, you may remember that I told you of them. And these things I did not say to you at the beginning, because I was with you.
It's also quite easy to understand why Jesus sometimes told people to remain silent about His miracles; sensationalism could actually hinder His ministry, so He occasionally took steps to avoid it. There's nothing "strange" about it. It was simply a matter of prudence.
[Quotes from NKJV]
This is the transfiguration, when Peter, James and John saw
Jesus change his appearance and then saw him taking to Elijah and
There is no reason given in the Bible for this strange request. However, it is a feature of Mark's Gospel that Jesus asked people not to tell others, when they witnessed a miracle.
Another view, held by some scholars, is that if no one had heard about the transfiguration when Mark's Gospel was written, then the author's credibility might have been questioned. The author could avoid this by writing that the disciples, the only witnesses to the transfiguration, were warned by Jesus not to tell anyone else until after he had risen. Jesus' permission to tell others after the resurrection would then be seen as fulfilled by the gospel itself.