In my mind, the Latin form of Mary is Mariam, because that's what my Latin teacher taught me. (He also commented that, unlike Greek names, Hebrew names never inflected in Latin, so that it would be "Mariam" regardless of what case the name should appear in.)
But it makes sense that Church Latin would be different.
But it makes sense that Church Latin would be different.