We often pretend that we have done something sinful that no one will ever know of. Yet God knows all things. He even knows our motives. The many who believed were believing wrongly. James reminds us that there are different kinds of belief.
Many today are devout and sincere in there beliefs, but sincerely wrong.
I recall years ago going to Argentina and touring a Roman Catholic Cathedral. I saw this elderly lady on her knees crawling until her knees would either be callused or bloody while counting her rosary and doing penance. She undoubtedly was sincere in what she believed, but according to Scripture she was sincerely wrong. Christ also knew the motives of those who gathered around Him that day back then. In the United States we have the American Bureau of Standards that contains a representative standard of weights, measurements, quantities and qualities, etc. to keep us honest.