Thank you for your question. The ultimate wisdom behind God's actions is unknown and simply being born into a non-Muslim family does not mean that a person is unduly disadvantaged, because God judgement of people is not linear. His Justice will prevail and be accorded to people according to their situations and what He has blessed them with. He does what is in the best interest of His servants and it is His creation that is unjust to their loving all-Merciful Creator. There are some traditions to indicate that there was a level of test prior to our creation in this world and that determined certain variables in this world. But ultimately the capacity of each creature is known by God, so even if these traditions are not accepted, the issue of who is born into what family, at what time, and all the other innumerable factors surrounding an individual's existence all come back to the Knowledge and Wisdom of God.
May you always be successful.