Catholic Answers:
2. Children of Mary?
These brothers are never once called the children of Mary, although Jesus himself is (John 2:1; Acts 1:14).
3. Other Women Named Mary
James and Joseph (also called Joses), who are called Jesus brothers (Mark 6:3) are indeed the children of MaryJust not Mary, the mother of Jesus.
After St. Matthews account of the crucifixion and death of Jesus, he writes:
There were also many women there, looking on from afar, who had followed Jesus from Galilee, ministering to him; among who were Mary Magdalene, and Mary the mother of James and Joseph, and the mother of the sons of Zebedee. (Matt. 27:56; see also Mark 15:40).
So why is it so important that Mary be both perpetually virgin and without sin?
Jesus is the One who saves us, not Mary.
The only requirement of His mother is that she be virgin. That’s all the prophecy called for and that was fulfilled.
Why add all the extra stuff? What difference does it make if she sinned or had sex with her husband?