Herod Agrippa killed James in order to win the confidence of the Jews. This was done in an attempt to show the Jewish people that he was a supporter of their beliefs and traditions, and to gain their favor and support. By killing James, who was a leader of the early Christian community, Herod Agrippa may have hoped to demonstrate his opposition to the spread of Christianity, which was seen as a threat to traditional Judaism.