 One of the reasons it seems like Jesus gave this commandment was because if the leper started telling everybody, Jesus' ministry would actually be hindered. Did you see that in the text? Because the fame of Jesus is spreading a bit too quickly, it says Jesus could no longer openly enter a town but was out in the desolate places. People didn't get to meet Jesus because the leper was overzealous in his evangelism.