Mary’s lineage was important, and so was Joseph’s, for many reasons, most importantly to fulfill God’s promise about the lineage of David. And I do not think there were any who could have taken her place. If she had refused, what then? If she had been unworthy, what then? I just do not think there were a large number of maidens who could trace their lineage back to David, unbroken. Just any old maiden would not do, to fulfill the prophecy.
God’s intervention in her birth was miraculous, to fulfill His purpose. Just my opinion, of course. Don’t take it for Catholic teaching, unless it agrees with the Church.
It is everything spelled out in #622.Miriam is not special,
except to fulfill prophecy as a maiden
with a clear bloodline to David and having no brothers.It could have been any other maiden
with a clear bloodline to David and no brothers.