That's just how God has purposed life to be -- for His glory and the merciful welfare of His family.
As hosepipe is wont to say, Jesus Christ didn't come to establish a religion but a family. Indeed, that is the flow of Scripture from Genesis to Revelation.
God didn't "need" this heaven and earth, we the adopted children needed it to prepare as members of His family in the new heaven and earth.
To God be the glory!
Exactly to prepare.. Human life "IS" a preparation, a testing..
Not that God needs to know but that WE need to know who we are..
This human experience tests us for our proclivities and quails..
We sort ourselves into groups as herds, flocks, pods and gaggles..
With as much selectivity as any animal, bird or insect..
Yes some humans prefer the Hive.. with drones, queens and workers..
We as humans are being tested whether we like it or not..
Even atheists, agnostics, and pagans of all sort..
All self sorting themselves into groups..
Its quite wonderful really.. God has to do nothing but monitor it..