I have puzzled over this datum for a long time now. John 19.25b-27 just cuts to the chase and says that Jesus' mother was there at the cross. (Acts 1.14 has Jesus' mother as already part of the Jerusalem church right from the beginning.) While I am convinced that the gospel of John betrays knowledge of the gospel of Mark (at least to some extent), I am not convinced that the other gospels were John's only sources for the story.
Maybe Mark did not know that this Mary, mother of James and Joses, was the same Mary as the one in Mark 6.1-6a. Maybe Mark knew it, but had a vendetta against the family of Jesus and did not want to advertise that his mother was weeping for her son at the cross. Maybe Mark invented the second Mary as a replacement for Jesus' mother (biological family versus sectarian family). Maybe the overlap of names (Mary, James, Joses) is just a big coincidence.
It is definitely a question to be answered.