Esther 2:3

And let the king appoint officers in all the provinces of his kingdom, that they may gather together all the fair young virgins unto Shushan the palace, to the house of the women, unto the custody of Hege the king’s chamberlain, keeper of the women; and let their things for purification be given them:

The king's order was for officers to be appointed in all the provinces of his kingdom to gather all the fair young virgins to Shushan the palace, to the house of the women under the custody of Hegai the king's chamberlain and keeper of the women, with their things for purification given to them. That gathering brought Esther into the palace and set in motion the chain of events that placed her on the throne. She pleased Hegai and obtained his kindness, receiving her purification supplies together with seven maidens and the best place in the house of the women. When her turn came to go in to the king, she required nothing beyond what Hegai appointed, and she obtained favor in the sight of all who looked upon her.

The king loved Esther above all the women, and she obtained grace and favor above all the virgins, so he set the royal crown upon her head and made her queen instead of Vashti, then made Esther's feast for his princes and servants, made a release to the provinces, and gave gifts. All this time Esther had not revealed her people or her kindred, but continued to do Mordecai's command just as when she was brought up by him. Through the events that brought Esther to the throne, God was working for His people despite the ruler's wrong practices.