Celibacy was uncommon but not unheard of. As far as we know, John the Baptist was celibate. Celibacy was also practiced in the Essene community at Qumran.
To be called a Rabbi, a man had to be married. Jesus was called Rabbi. It is not a stretch to think that a 30 year old man was married. The New Testament is silent on the subject of Jesus' marital status. It also does not refer to Mary Magdalene as the prostitute. That is an assumption based on the nearness of her mention appearance as a follower of Jesus after his forgiveness of the harlot and his command to sin no more. That concatenation of events cannot be construed to mean that Mary Magdalene was the harlot.