GEN 37:36
And the Midianites sold [Joseph] into Egypt unto Potiphar, an officer of Pharaoh’s, and captain of the guard.
Genesis 37:36
Joseph meant nothing to the Midianites. He was just another business transaction. So Joseph was resold (probably for a profit) to the chief of the executioners. How’d you like an executioner as your boss? Just hope he doesn’t say, “Off with his head!” Again we see God carefully controlling everything for a purpose that was still a long way off. We are thankful that the God of the universe, who knows the end from the beginning, cares for His own with a special interest.