In a way, James' question is rhetorical: "who is wise and understanding among you?" Everyone would like to think of themselves as wise. But James is saying: "You think you're wise and understanding? Let's check the quality of your wisdom." He does so through a series of contrasts between the unwise and the wise.