God hates sin because it is the very antithesis of His nature. The psalmist describes God’s hatred of sin this way: “For You are not a God who takes pleasure in wickedness; no evil dwells with You” (Psalm 5:4). God hates sin because He is holy; holiness is the most exalted of all His attributes (Isaiah 6:3; Revelation 6:8). His holiness totally saturates His being. His holiness epitomizes His moral perfection and His absolute freedom from blemish of any kind (Psalm 89:35; 92:15; Romans 9:14).
The Bible presents God’s attitude toward sin with strong feelings of hostility, disgust, and utter dislike. For example, sin is described as putrefying sores (Isaiah 1:6, NKJV), a heavy burden (Psalm 38:4), defiling filth (Titus 1:15; 2 Corinthians 7:1), a binding debt (Matthew 6:12-15), darkness (1 John 1:6) and a scarlet stain (Isaiah 1:18).
God hates sin for the simple reason that sin separates us from Him: “But your iniquities have separated you from your God; your sins have hidden His face from you, so that He will not hear” (Isaiah 59:2; see also Isaiah 13:11; Jeremiah 5:25). It was sin that caused Adam and Eve to run away from God and hide “among the trees of the garden” (Genesis 3:8). Sin always brings separation, and the fact that God hates sin means that He hates being separated from us. His love demands restoration, which in turn demands holiness.
Read more: https://www.gotquestions.org/God-hate-sin.html