Joseph was of good behavior because he served diligently in Potiphar's house. Joseph was sold by his brothers to traders who brought him to Egypt. There he was sold to Potiphar, an officer of Pharaoh. Joseph served as a slave in Potiphar's house and was given great responsibility. Despite being tempted by Potiphar's wife, he refused to betray his master's trust and was falsely accused and thrown into prison. However, his good behavior and trustworthiness were recognized even in prison, and he was put in charge of other prisoners. Ultimately, his good behavior and diligent service led to his release and promotion to second-in-command in all of Egypt.