Here is what I have had driven home to me lately. Safety is an illusion. Security is an illusion. We talk about job security, financial security, etc. That's all an illusion--some parents might say, "God didn't send us here to sacrifice our children for the souls of others." All of those thoughts, ideas, beliefs would make sense if it weren't for the fact that we could be taking a walk and a drunk driver swerves off the road onto the sidewalk and kills that child that we were going to protect.
Security is an illusion because we only think in terms of the short view, or in other words, this life now. What does all this have to do with Ester (her being a part of God's plan to redeem his people, yet another time is like the drunk driver for me). God did not support sex trade, nor would he want anyone to have to endure what Ester endured. However, evil does exist in the world along with the good. Because of evil she found herself in her predicament. But God--good--always trumps evil. If I remember correctly the scripture says something like, "God has placed you here for just such a time as this." Hebraically speaking, because the Jews were monotheist to the core everything was due to God. It's like the guy who slammed his hand in the car door, went to the hospital and was able to tell someone about God. That man might say, "Thank you God for slamming my hand in the door!" when in reality it was his stupidity.
God can redeem any situation regardless of what it is or how it comes about, to draw his people to himself and/or provide a way of rescue.
Your struggle is a struggle that all of us who take the bible seriously are constantly sorting things out because they don't fit the schemes that we have been taught. The cool thing is the mystery that surrounds God. We can't dissect his word like a frog in biology lab which is sort of what modernity did with scripture, God, the whole deal. Cause and effect, scientific, objective evidence, all were tools that modernists have used to try and figure it all out--and consequently, not allowing for mystery--the mystery of God.