(As to origins, that is.) It's because we are in what is called a very long process. And the father of lies weaves strands of truth into all of his tapestries. (Which is doubly clever, for then we weave them into our psyche and life.)
When God endowed thinking ability a whole new realm (tree?) of possibilities came about, and He is being, and has been, infinitely patient awaiting the outcome. You see thinking ability includes being able to make choices, and hence we have life as it is and also death. Because God is Life itself, and is also Perfection. That makes imperfection, the opposite of life. And sooner or later, some one (some rational creature) is bound to think, "say.. do we really have to do all things, and think all things, God's way?"
He first made angels to be rational creatures. He waited and created the universe and man and woman, not only after the first rebel thought occurred, but waited until after it had matured into outright revolt and sedition. (Why? So all "in heaven and earth" would take this unavoidable journey and lesson, all together, at once.)
"Waited a very long time".. surely!? ..Here's where the "billions of years" actually comes from(!?) For when there was 'only' the Presence of the Father and the Son and the angels, surely there wasn't all that much to go astray about(?) And just think, God, being life itself, lives through all sufferings and disasters which ever occur (while He is for the most part, letting choice run its course).
And when God created the universe, in that majestic explosion of life / Himself, he placed all things where He wanted them to be, and began the motion from there. And! From the "foundation of the world" / from the beginning, He built the rescue of all into it - Jesus on the cross - an image, and love, strong enough to ultimately pierce every psyche. He is perfect, the only 'end' result imaginable, is the best one possible.
1 Timothy 4:10, among many, many verses, says "God is the savior of all.."
A thank you to Pixabay.com for the image.