GOD gave evil the 'mark of Cain' which is a set of three prodigies granted to Cain and his descendants in order to help them survive despite the curse of restless wandering which GOD gave to Cain as punishment for murdering his righteous brother Abel.
This genetic 'mark' first arrived through Cain's grandsons; Jabal, the master nomad, (able to survive and thrive in any environmental condition), Jubal, the master musician and artist, (able to entertain people of any tribe), and Tubal-Cain, the master of the forge, (able to produce any tool or weapon to satisfy anyone). Between these three prodigies, the descendants of Cain are able to survive despite being without a permanent home on earth.
This genetic 'mark' survived within Noah and his sons and manifested again later among the unrighteous born within his lineage. It drives men to leave their lands, homes and inheritances, restless to explore, seeking out new adventures or opportunities elsewhere, even if life is good, safe and prosperous where they are. They naturally hate to stay in one place and discourage others from doing so also.
In the New Testament era, this is known as the 'mark of the fugitive' or 'mark of the beast,' (Greek: 'therion').
Most of the people now under its influence are highly driven to leave the entire planet itself and live in 'space.' It is what drove them in previous eras to explore the entire terrestrial world. The Bible calls this 'new' location the endless abyss of outer darkness and describes it as the ultimate 'home' of evil, where it will restlessly explore forever, never finding a home there either.
That was always GOD's plan. It is how He decided to separate the righteous from the unrighteous. It isn't any kind of 'mistake.' At least not GOD's mistake.
I don't think the experience for evil will be anything like 'Star Trek' though, because Jesus describes it as a place of 'weeping and gnashing of teeth,' (Matthew 8:12).