That explains how Mary the Virgin conceived Jesus.
So, now, Joseph shouldn't be too skeptical of Mary's loyalty to him...if he's still around, that is.
God didn't chose her randomly. In her heart that God saw she's pure and mindful of others. She has no spot + speckle (filthy sins as inequities) so Jesus could inherit her sinless nature. You can see how Jesus avoided three temptations from the devil, (1) turn stone into bread, (2) build a kingdom of his own, (3) kneel and worship Satan.
It's the elder assume she's a homewrecker, but it's God spoke to Joseph in the dream there's no one has touched her. God knew Joseph can be reasoned with.