Why did the Jewish audience need to hear about the law in James? They "needed to hear about the law" was because they were not being "doers" of the law, i.e. the Word (James 1:21-23). James was reminding them how to live for the glory of God. It appears those who were not being "doers" fell into antinomianism and lived a disobedient lifestyle contrary to the truth [gospel] (cf. James 1:18; 3:14; 5:19). This explains why James emphasizes the necessity of fruitful works as evidence of conversion.
In James, faith should produce fruitfulness, which in turn produces righteousness. Faith without faithful Christian witness and service does not validate true faith. Justification is vindicated through true faith in Christ alone, yet one who has faith must live accordingly to the implanted word, the truth, the royal law (the "Scriptures" cf. 2:8; 2:23; 4:4-5). Hence, positional righteousness is given to those who believe in Jesus, but practical righteousness should be displayed in Christians.
James argued that those who are justified by faith should demonstrate active obedience to God, just as the law taught from the beginning. The Jewish audience was then taught to obey the law in order to be a blessing, "But the one who looks into the perfect law, the law of liberty, and perseveres, being no hearer who forgets but a doer who acts, he will be blessed in his doing" (James 1:25). James writes to showcase how people [the Jewish audience] needs to live as a blessing and not a curse (e.g. partiality, speech, wisdom, jealously, anger, injustice, patience, prayer) which is vintage Deuteronomy 30.