Satan is very good at deceiving us human beings to mislead us. Allah knows this earlier. Why did Allah let Satan to misguide us? Why did He give time till Day of Resurrection to make us go astray?
In short: I think, its main reason is to test us; since we have will, and can don't obey him ...
More study (a google translated text, I hope it is a right translation):
According to the Qur'anic verses, Satan, after being expelled from God, asked God for respite, and God gave him respite for a certain period of time, and Satan, after obtaining respite, declared that he would tempt the children of Adam, and they Will force him to do bad things. Note the following verses: The Lord said, "Do you think that they will be resurrected until the Day of Resurrection?" ...
And so on.
Is this the same as why Allah allows Satan to tempt humans or why Allah creates an evil which can certainly destroy human morals? if correct the answer
The evil created by God is not evil, but all the evil that occurs is the result of their free will.
~ Bediuzzaman Said Nursi
Can you say making knives is a crime (because you can do something evil with it)? not right, if you use it to cut a fresh fruit it will be fine and will be satisfying but different if you use it for evil acts it will be evil (knife). from here you can see this is the intention of Allah the creator of the universe.
I hope this video can be a complement: https://www.youtube.com/watch?v=7Ev1AetvFDI
this answer does not mean to offend anyone
sorry for my english. I am still learning :D
You have to understand that the real question you're asking is:
Why does Allah allow evil to happen?
From a technical view Satan is just a medium for that. If that's understandable then this question is already answered.
Specifically about this question:
God is just. Yet he has no guarantees that he will set justice in this life. His promise is for the next world.
To allow this world to be a worthy test. One that decides an eternal destiny for us, Allah was OK (ie he didn't stop us from committing sins, while he forbids it) with allowing Satan to mislead us. He's also ok to let tyrants to kill, disobey and ignore his teachings. Satan never had control over us. We always have full control over our actions. And at the very end a good number of people will end up in the heavens.
Basically Allah is fine with being being disobeyed. Satan can disobey Allah. We as humans can disobey Allah even without the existence of Satan. Satan is one among the Jinn and Ins (humans). Ins and Jinn both have desires. If we were blocked from committing sins then this world would really have not been a test. The only thing about Satan is that his power is significantly more than the average human.
If Allah was not just or didn't command us to do right and forbid us from wrong or didn't send us prophets then Allah was to be critiqued. But he's done everything right.