Priests were allowed to marry until they started to leave the church property to their heirs ..
Bingo.
And that is precisely why the current cleric celibacy policies were enacted by the Church during the Middle Ages. Nepotism and simony were big issues facing the Church at that time. Compulsory clerical celibacy was implemented as a response.