They knew he was innocent and jailed him anyway.
Prison to save face
Even after they saw the proofs of his innocence, they decided to imprison Yusuf. Ibn Kathir suggests they wanted people to think Yusuf was the guilty one, since the news had spread. Years later he would refuse to leave prison until his name was cleared.
The intern blamed so the senior manager keeps his bonus. The child punished because the adult is embarrassed. Sometimes people know the truth and still choose their image. Allah sees the full file.
If I am treated unfairly, it must mean my truth did not count.
People can bury the truth for a time, but they cannot erase it.
If you have let someone else carry blame that was yours, take one step to set it right.