She was not ‘married’ yet…remember, Jews had at that time (and still do, actually) two stages of this relationship. NOW, a Jewish wedding does both stages at the same time, but when Mary and Joseph were 'betrothed," the first stage (which COULD include sexual intercourse, but often did not, if the woman were too young…) during which the woman lived with her parents while the man took the time to make a home for her—and then the second part, when she left her parent’s home to live with her husband.
in fact, it was quite possible for a girl to be betrothed when she was every, very young indeed; even in infancy.
…just had a thought…there has been some speculation that perhaps Joseph was chosen to be Mary’s husband because he was elderly–that he would be a protector.
If that’s so, he could have moved her into his home immediately…if he were chosen to protect her, wouldn’t part of his qualifications be that he could physically support her? I can see a young man having to take a year to get his act together and a home built, but—an older man?
Hmmn…Joseph WERE an older man chosen as a sort of ‘father figure’ for her, then about the only reason he would leave her with her parents was because she was too young…not old enough for sexual intercourse (whether they intended to have it or not, the woman needed to be old enough…that is, having gone through puberty…before moving in with her husband).
Therefore…it is quite reasonable to figure that she was ‘married’ and still not having marital relations with her husband. We do know that she was very young…thirteen or fourteen. IT’s quite possible that she simply wasn’t quite done with the changes of puberty yet.
Therefore her declaration is not proof that she was a consecrated/lifelong virgin…just that she was not engaged in that aspect of a marriage that wasn’t, yet, complete.