Mary is not a Hebrew name.

Marcello Craveri’s book The Life of Jesus addresses this rather well.

From Chapter 1, Joseph and Mary:

Joseph is a genuine Hebrew name. Mary (Miriam), however, is of Egyptian origin.The first Jewish woman to bear this name was the legendary sister of Moses.But in the time of Jesus it was quite common in Palestine. Perhaps itspronunciation had already evolved from Miryam into Maryam, unless this wasa later change as a form of homage to the Madonna. Actually, the newpronunciation makes it possible to relate the name to the Aramaic word mar(a),which means “Lord,” or to other roots, so that many other interpretations(more than seventy!) can be drawn, among them: Majestic, Sublime (marom),Beloved of God (mir yam), Bringer of Light (mareh), Affliction (marah), andBitter Sea (mar yam).