It is my personal opinion that the beliefs at the time this doctrine was "developed" were that sex was dirty and Jesus mother couldn't have sullied herself in such a disgraceful act as to have sexual intercourse ever (even with her lawful husband). Of course, once the doctrine is developed it's not likely to ever be changed. It's not in their way of doing things to admit they were wrong.
Which certainly is not a Jewish idea. The first command in the scriptures is to "be fruitful and multiply". There is no lifelong celibacy in Judaism.
Just responding to early argument:
There seems to be a controversy with Matthew 13:55-56, which says:
Mat 13:55 Is not this the woodworker's son? is not his mother named Mary? and his brothers James and Joseph and Simon and Judas?
Mat 13:56 And his sisters, are they not all with us? from where, then, has he all these things?
Part of the proof that these were Jesus actual relatives can be found in the next verse:
Mat 13:57 And they were bitter against him. But Jesus said to them, A prophet is nowhere without honour but in his country and among his family.
Notice that Jesus said a prophet is without honor in his own country and among his own family. Some translations call it "house" instead of "family". But the meaning seems to be clear. The previous two verses speak about Mary, Joseph, and brothers and sisters. The next verse uses the word family.
Sorry if someone already brang this up.