And now, do not be distressed and do not be angry with yourselves for selling me here, because it was to save lives that God sent me ahead of you.Genesis 45:5
Who sent Joseph to Egypt in slavery?
Joseph is clear - his brother's sinful decisions put him there AND God sent him there in order to save lives.
The Bible says that we are responsible for our own sinful decisions AND that God is control of everything that happens. Mind blown!