There's that woman that claimed a 3D movie got her pregnant because she cheated on her guy who was gone for several months, and he bought it.
That's the way Mary did it with poor Joseph. He was just a simple minded carpenter after all. He totally believed that she got pregnant without anyone shagging her.
She could've just used the old "I sat on a dirty public toilet seat" excuse.