This is the ancient tradition of the Church, east and west, since the Council of Nicaea when it was offered as a compromise between some who wanted celibacy as the norm, and others who thought it should not matter whether marriage or orders come first.