The Bible is a sparse history. It omits many major contemporaneous events that were recorded by other cultures at the time. It can hardly be considered an exhaustive treatise. Remember also, the Bible does not contain every writing that references Jesus from that time, just those considered particularly relevant to Christianity. There are more mundane pieces that were left out of the standard Christian Bible. And while I actually have no opinion on whether or not Jesus was married, I do know that when you piece together the entire collection of original texts, including the esoteric ones that are not included, there is a strong implication that Jesus was in fact married, though I believe it is never explicitly stated i.e. there are a number of things that in that time and place would have automatically implied that he was married, in the same fashion that you can usually assume someone is married today by a number of cues that strongly imply it even if they never state it.