Mary has been used as a middle name for boys in Catholic families in honour of the Virgin Mary, occasionally in combination with Joseph as a reference to the parents of Jesus Christ. It is probably more common in French communities as Marie.
Thanks to Donald Whyte who provided much of the initial information for this site.