We read about Yosef's meteoric rise to power and wealth. His interpretation of Pharoah's dreams and following advice finds favor in Pharoah's eyes and he appoints Yosef to the position of the minister responsible for averting the coming famine and implementing the ideas and policies they had discussed.
In 41:45 Pharoah changes Yosef's name to Tzafnas Pane'ah and gives him Osnat the daughter of Potiphar as a wife.
Yosef just got out of jail. He was sitting in jail for a few years after having been out there by Potiphar. He was accused of attempting to rape Mrs. Potiphar, after her really having attempted to seduce him (and failed) and therefore put in jail. Why would Yosef agree to marry Osnat, the daughter of the people who caused him so much pain?
This is not such a difficult question. Yosef saw with Ruah Ha'Kodesh that Osnat was the woman for him to marry, so he ignored all the side issues because he knew she was his bashert. It is like Yaakov marrying Lavan's daughters and Yitzhak marrying Lavan's sister. Despite knowing how evil the family was, they knew that these were the women meant to be the mothers of the Jewish Nation, so they ignored the family history and did what they had to do. So Yosef married Osnat.
But, my question is, what was wrong with Pharoah, Mr. Potiphar and Mrs. Potiphar?
Pharoah must have checked why Yosef was in jail (for sure after he took such a liking to Yosef befor he would be willing to appoint him as a minister he would want to know why he had been in jail). He must have been given the reports on the attempted rape of the wife of one of his top men. Why would Pharoah offer the daughter of Potiphar as Yosef's wife? Was there nobody else available for Pharoah to offer in marriage?
And Mr. and Mrs. Potiphar - how did they get involved in this? Mrs. Potiphar was a schemer and she knew Yosef did no worng, but Mr. Potiphar thought Yosef had tried to rape his wife and Mrs. Potiphar at least had to continue putting on the show. How could they agree to let Yosef marry their daughter?
The answer I can suggest is that they were very greedy people. Morals and all that did not make a difference. They saw Yosef was on the rise and they wanted part of the action. They could tell he was moving into a position of power and wealth so they forgot aout all the history and offered their daughter Osnat to be his wife (I would guess they suggested to Pharoah that he offer their daughter to Yosef).
If anybody has a better answer, post it in the comments.