i am not a christian, i´m muslim, but here are my thoughts on this:
One of Allahs many attributes is wisdom. He is called al-Hakim (the most wise). Allah/God told us in various verses of the Quran that He has not created us as a mere play with no beneficial purpose.
Although mankind is doomed to be sinful, the turning point of it all is your faith. The most important thing is your faith in the Creator and the worship (good deeds) you serve Him. This is the test in this world.
Now, knowing that Allah is the most wise of all and that He has created mankind, the heaven and earth for a sublime purpose, their might even be things that we cannot understand or comprehend yet; all we know is that this life is a test for the beliefers and non-beliefers and that we will be held accountable and be judged by Allah at the end of times - and we need to remember Allah is the most merciful.
but why did Allah create us if he does not need us?
perhaps we will never really, fully understand all the reasons for the creation of this universe.
like previously stated, Allah did not create us without wisdom behind it. He also created us to worship Him. We need Him. We are servants of Allah rather than purely slaves to the worldly life.
Our free will is also what will qualifies us to get Allahs Honor and with Allahs mercifulness, we will earn the ever lasting reward of Jannah/paradise/heaven. What we know for sure is, that this life and test is porpuseful and will determine our afterlife for eternity.
i also want you to consider the following thoughts:
not everything is done for a exact need. like an artist painting a picture. he does not necessarily need to paint a picture, it rather is a matter of putting his skill into action.
in the end, Allah knows best. I hope this doens´t sound to confusing and maybe helps giving you more input on your question. Also, i´m not a scholar in islam so i´m not insanely knowledgable on this topic but i want to share what i know regardless :) take care!