According to James 4, conflict comes from the Iusts of the flesh. From wanting things you can't get. And you ask but don't get because you have bad motives. James is basically warning against being a friend of the world. We need to humble ourselves before God. God brings humility through trials. Too often we want to have a good reputation before others and don't want others to see us for who we are.