Regarding the "Why?" to the Idea of a 'Virgin Birth.'
This is the most important question on this controversial topic - yet it never gets addressed. As everything G-d does has purpose, WHY would the birth of Messiah ben Yosef, (Yeshua ben Miriam) require such an unusual (to say the least) aspect to it?
Here is a kabbalistic understanding.
All souls entering into the world must pass by what we may refer to as the 'evil realm' (the Sitra Achra, i.e., haSatan, Samael, the serpent, etc.) As the soul descends, this evil realm looks at the parents to see if they are righteous. If it deems they are, it concludes that the likelihood of a tzadik being born to them is high, and this evil realm will attempt to interfere and strike at the child to prevent such a tzadik from entering the world.
It is taught that in order to circumvent this, G-d 'tricks' the evil realm by giving a (false) image of impropriety to one or both parents - generally the appearance of immorality.
The evil realm, now "thinking" that this is the case, will 'not bother with' such a child, assuming a tzadik would not derive from such immorality.
The sages not only name names in this case, but associate it directly with the lineage of messiah - pointing to the Judah/Tamar incident (among others). With Tamar, it 'looked like something immoral,' but in fact the 'higher purpose' was served (of continuing the line of mashiach). The evil realm was 'distracted', thinking the woman was committing an evil act, when in fact she was serving G-d's purpose.
Taking this established principle and applying a kol v'homer argument: If this was the case for those in the lineage of mashiach, how much more true would it be for the actual birth of mashiach?
Thus, what would appear (to the evil realm) as Miriam having become pregnant by another man while betrothed to Yosef, was in fact the 'greatest ruse of all time' on the part of G-d, causing the evil realm to look away from the greatest tzadik to walk the planet.
As Rabbi Nachman of Breslov referred to this soul of mashiach being the 'keter of keter' of all souls regarding bringing atonement.