The book of James confused me a lot. Everywhere in scripture it says we are saved by faith alone, not works, so I got confused about James 2. I saw some preachers twisting scripture in a way that still did not make sense... Saying things like being saved from man and stuff like that.
So I prayed to God for him to explain to me, and I figured it out! The book of James is talking to the 12 tribes of Israel (James 1:1). The 12 tribes of Israels are also mentioned in the book of Revelation. James is actually a prophetic book, talking to the Jews in the last days during tribulation. This is shown in James 5:3, literally saying that this is for them during the "last days". And we know during the time of Jacob's trouble, the Jews are not saved by faith alone, but by faith and works. This includes enduring until the end, avoiding the mark, and keeping the commandments of God (Revelation 14:12). So this book is not for the church, but for the 12 tribes of Israel, the Jews during the time of Jacob's trouble and tribulation in the last days. It was very eye opening when I realized this and it made a lot of sense.
That's why its important to rightly divide and pay attention who the message is for and really read what it is saying, rather than make a complete theology from one verse in the bible.