Either One or the Other
There is an old English saying, "A man is known by the company he keeps". It originated from a 16thC book for marriage preparation, translated from the Swiss author and pastor Bullinger, which was avidly read as a way to understand how to put the Bible's teaching into everyday application. Those we choose as our friends not only influence our thinking, but also reveal the values we admire. Proverbs 13:30 says, "Walk with the wise and become wise, for a companion of fools suffers harm."
It is the same with God. Either we love what God loves, or love what He hates. There is no middle ground: like in marriage, we are either faithful or unfaithful - 'half faithful' is actually 'unfaithful'. The Old Testament often uses adultery as a picture of spiritual unfaithfulness to God (Ezekiel 23:3). People who focus on the temporary pleasures God has not given or allowed, are rejecting the One who loves them - which is truly hateful towards God. No wonder He calls them enemies. Indeed, before we welcomed Christ, we were all enemies in our minds towards God (Colossians 1:21).
Yet James is speaking to Christians (or at least people in the churches who call themselves Christians). It is designed to be a reality check! How can it be that a believer can reject a relationship with God in favour of hell-bound companions, and short-lived worldly pleasures? It is simple: we choose. Like Eve, who chose to disobey God because the snake's suggestion sounded better (Genesis 3:1-7), every sinful choice is an act of hatred towards God. Friendship is a choice we make; love is a decision. Although we live in the world we are not to love the world. 1 John 2:15 says, "Do not love the world or anything in the world. If anyone loves the world, love for the Father is not in them."
What we most value in our hearts, what we think about in our minds, is the result of choices. In order to grab what God has not given, people make friendships with those they think can help them, because they share the same greed. Instead of putting God in the centre, human pride rejects His wisdom, rushing with others, to secure its selfish goals. But it cannot lead to true contentment, and it is certainly not godly and has eternal consequences (Psalm 1:1-6). Instead the restless heart is often seen at work, at home and even in the church … leading to all the arguments and struggles described in James 4:1-3. But there is more at stake: our friendship with God. Jesus asked the question, "What good will it be for a man if he gains the whole world, yet forfeits his soul? Or what can a man give in exchange for his soul?" (Matthew 16:26). If that is you, a mark of repentance is a new set of friends.