Because Joseph strove to please God first, the divine Potter was able to shape his life into something special.
Joseph: Human Clay and the Potter (Part 1)
God used Joseph’s evil slave experiences in Egypt to shape him into the god-honoring man he became.