Jacob is famous to exemplify, behind the story of the bowl of stew in exchange for his birthrigh, the point that who is rich is such because he is loved by god (=YHWH).
Usually, material richness is considered a sign of grace in Judaism.
But that richness is material. As such, it had to be condemned by the Gnostics as coming from the evil demiurge.
For the Gnostics, the material richness is evidence that the rich is loved by the evil demiurge, that he is "friend" of the demiurge.
Just as Abraham was the "friend of God".
And the scripture was fulfilled that says, "Abraham believed God, and it was credited to him as righteousness," and he was called God's friend.
(James 2:23)
Idem for Jacob himself:
But you, Israel, my servant, Jacob, whom I have chosen, you descendants of Abraham my friend.
(Isaiah 41:8)
Hence who better than an invented guy named James had to be the putative brother of Jesus and rejected by Jesus, just as the his putative mother?
Who better than a real guy named James had to be considered, beyond if true of false, the strongest leader of the Judaizers?
Hence Mary and James are respectively the names of the presumed mother and brother of Jesus because they refer to the ordinary Jewish mother (condemned as such as she gives birth only to obey the creator) and the ordinary name of the "friend of YHWH" (Jacob = James).