ثُمَّ بَدَا لَهُم مِّنۢ بَعْدِ مَا رَأَوُا۟ ٱلْءَايَٰتِ لَيَسْجُنُنَّهُۥ حَتَّىٰ حِينٍ
Commentary:
The imprisonment of Joseph, as is generally understood, was not the result of the acceptance of his prayer mentioned in the preceding verse. The acceptance of the prayer resulted in the guiles of the women being defeated. The idea of imprisoning Joseph was an afterthought. It had nothing to do with his prayer. It appears that as the ill fame of Potiphar’s wife spread in wider circles, her people thought that the best way to put a stop to this scandal-mongering was to imprison Joseph so that public opinion might come to regard him as the offender and the blame might be shifted from that guilty woman to this innocent man. The seeing of "signs" seems to refer to the incident of the garment and to the fact that the name of Potiphar’s wife began increasingly to come into greater disgrace.
It appears that as the ill fame of Potiphar’s wife spread, her people thought that the best way to put a stop to this scandal-mongering was to imprison Joseph in order that public opinion might come to regard him as the offender and the blame might be shifted from that guilty woman to him.