God will not allow sin to dwell where He is.
GOD designed creation to work a specific way. Behavior that is inconsistent with GOD's design is sin. Because sin is against GOD's will, GOD hates sin.
GOD is completely holy, which means that He is entirely set apart from all of creation. GOD is righteous and just.
Because GOD hates sin and GOD is righteous, just and holy, His nature disallows Himself from coexisting with sin in His presence. For this reason, GOD must keep Himself separated from sin.
As the prophet Habbakuk put it:
13 [GOD's] eye is too pure to see evil, and You are not able to look upon affliction.
(Habakkuk 1:13 OSB)
GOD will not dwell (abide) in the same place as evil.
5 For You are not a God who wills lawlessness,
Nor shall the evildoer dwell with You.
(Psalm 5:5 OSB)
When a person sins, they become an evildoer because, well, they did evil.
This principle is borne out in the account of the Garden of Eden in Genesis. GOD created the beautiful paradise and placed Adam and Eve there to work and care for the Garden.
In the beginning, since Adam and Eve were innocent and righteous, GOD had a perfect relationship with them in the Garden (see Genesis 2:15-25). However, after Satan tempted Eve and she and Adam ate of the forbidden tree, things changed. GOD promised them that they would die in the day that they touched and ate the forbidden fruit (see Genesis 3:3).
While Adam and Eve's sin did introduce physical death as a consequence, their physical death did not occur "in the day [they ate] from it," as GOD had said. Rather, GOD was referring to Adam and Eve's perfect spiritual relationship with GOD.
As sin entered Adam and Eve's physical body, sin severed the perfect connection with GOD.
The apostle Paul worded it perfectly, millenia later:
23 For the wages of sin is death ...
(Romans 6:23 NIV)
And what became of Adam and Eve as a result of their disobedience? GOD cast them out of the Garden. He placed heavenly creatures called cherubim at the entrance to the Garden, blocking access to the tree of life.
Everything changed. Problems entered the previously-perfect human environment. Physical pain and death became a reality. No longer did GOD dwell in perfect unity with His human creation.