She was in a low class area that was treated badly. After all that Jesus, god, jazz somestuff, they were no longer looked down upon, correct? She was successful.
Yes, claiming to give birth to the son of God in a strict religious community in which they would all no doubtably punish them for - Such as nearly stoning her or killing her son - was obviously a cleverly crafted ploy in which, from the beginning, she knew would work out. And the fact that it was most likely years after her death that she even got any real recognition (and she never actually has been officially canonized nor did she ever lead a church or recieve really anything) was obviously another ploy she created in order to make it seem as though it was the real deal. :I
It wasn't as if she said "I'm giving birth to God's son :D!" and then everyone went "Awesome!", parading into the sunset and giving Mary control over humanity.