Jesus left the beloved disciple with his mother Mary for a very practical and far reaching outcome. Thus the beloved disciple and by extension other disciples (both male and female) finally became part of his family. By technically becoming sons and daughters of his mother they also became his siblings. In other words they were merged into his true family. This is why Jesus starts calling his male disciples brothers only after resurrection. The famous scene in Matthew 12:47–50 is a precursor to this. He is not addressing his disciples as brothers yet but already makes a statement that they are his brothers in a declarative way. However this was only a premature declaration directed towards the future as in that particular moment they were still inferior. Had his disciples and this crowd really were his family he would not cease the sermon so abruptly to go away with his real family. (Please do two things: forget the godless artificial chaptering of the Gospel and read in the original Greek. Still in the same day the crowds found Jesus again while he was sitting alone by the lake apparently after taking care of family business for which he left the crowd earlier). The whole point of this statement was a motivational promise that it is indeed possible to become real family members by doing the will of God the Father. This promise became flesh during the event of the crucifixion.