Mark was the first Gospel written and contains this enigmatic story of Mary and Jesus brothers coming to retrieve him thinking him insane.
Mark/s Mary and Jesus Brothers knew of no miraculous birth stories of Jesus, declarations of Angels to Mary nor Mary's joyous response as we find in Luke. Only Mark notes this embarrassing moment and all other Gospels do not repeat it and did not include it.
In the context, Jesus family (Mary and Brothers) hear about Jesus meeting and went to get him just as one might go retrieve a naughty child at the neighbors and bring them home.
Then to add insult to injury, Jesus rejects their visit, disavows his mother Mary and brothers and tells the crowd that they are his mothers and brothers if they believe on him. It seems Jesus shunned them, in part, because he knew why they had actually come to see him.
Mark already noted Jesus awareness of his family rejection in Chapter 6. Obviously in Mark, his family is not presented as knowing anything about Jesus birth in Matthew and Luke, who don't agree with each other either.