Abbas - Tanwîr al-Miqbâs min Tafsîr Ibn ‘Abbâs
(And it seemed good to them) to the Chief Official (after they had seen the signs (of his innocence)) the torn shirt and the judgement of her brother (to imprison him for a time) a few years; it is also said that (for a time) means: until people stopped talking about it.
Then it seemed, it appeared, [good] to them, after they had seen the signs, indicating Joseph’s innocence, that they should imprison him for a while, until such time as people ceased to talk of him. He was thus imprisoned.
Then it seemed [good] to them, after they had seen the signs that they should imprison him for a while: in other words, there appeared to the ʿAzīz of the spirit, the women of the soul, the faculties and the spirit assistants, such as the intellect and reflection and others, a certain opinion on which they were all agreed and that was that they should imprison him, namely, that they should leave him in the isolation which was dearer to him. As for the spirit, this was because of its subduing of him by the light of presential vision and preventing him from acts of free disposal and from his attributes. As for the soul and all of the faculties, it was because of their inability to attract him after they saw the signs of [divine] immunity, sincerity of resolve and his refusal to incline to them as well as his dazzling of them with his light and his faithfulness in being needy of God, for otherwise they would never have left him alone in his solitariness. As for estimation, it was because of its retreat from his light and flight from his shadow when he stood firm in his religion and sought refuge in the Truth. As for the intellect, it was because of its illumination by the light of the guidance; while for reflection, it was because its authority is actualised during solitariness.
Allah says, `Then it occurred to them that it would be in their interest to imprison Yusuf for a time, even after they were convinced of his innocence and saw the proofs of his truth, honesty and chastity.' It appears, and Allah knows best, that they imprisoned him after the news of what happened spread. They wanted to pretend that Yusuf was the one who tried to seduce the `Aziz's wife and that they punished him with imprisonment. This is why when the Pharaoh asked Yusuf to leave jail a long time afterwards, he refused to leave until his innocence was acertained and the allegation of his betrayal was refuted. When this was successfully achieved, Yusuf left the prison with his honor intact, peace be upon him.
Maududi - Sayyid Abul Ala Maududi - Tafhim al-Qur'an
It occurred to them to imprison Prophet Joseph in order "to save face" after they had seen clear proofs of his innocence and of the guilt of their own women, for no other alternative was left, in their opinion, to undo the scandal that was spreading fast in the land. But it did not occur to them that in fact his imprisonment was his moral victory and the moral defeat of the rulers and the dignitaries of Egypt. By that time, Prophet Joseph had not remained an unknown person, for all and sundry had heard stories of his beauty and piety, and of the love the "ladies" had shown towards him. Therefore when those "wise" courtiers put into practice their plausible device to imprison him in order to reverse the doings of their "ladies", the common people must have drawn their own conclusions for they knew Prophet Joseph to be a man of pure, strong and high character. So it was obvious to them that he had committed no "crime" to merit imprisonment, and that he had been imprisoned because it was an easier way of escape for the chiefs of Egypt than to keep their own ladies under control.
Incidentally, this shows that imprisonment of innocent people without trial and due procedure of law is as old as "civilization" itself. The dishonest rulers of to-day are not much different from the wicked rulers who governed Egypt some four thousand years ago. The only difference between the two is that they did not imprison people in the name and for the cause of "democracy" but they committed unlawful acts without any pretext of law. On the contrary, their modern descendants make use of the specious pretenses of honesty when they are acting unjustly. They first enact the necessary unlawful laws to justify their unlawful practices and then "lawfully" imprison their victims. That is to say, the Egyptian rulers were honest in their dishonesty and did not hide the fact that they were imprisoning people to safeguard their own interests, and not those of the community. But these modern disciples of Satan cast innocent people into prison to ward off the "danger" they feel from them, but proclaim to the world that their victims are a menace to the country and the community. In short, they were mere tyrants but these are shameless liars as well.