The Church only defines universally held doctrines infallibly when they come under constant and widespread attack. The push for the ordination of women, for example, is a modern phenomenon so the Popes, Bl Paul VI and St John Paul II were forced to tackle the issue, they could not let it continue.
The accusation that the Church has erred is convenient for those who cannot match their lives to the teaching of Christ. The corollary is that if the Church can err on matters of Faith and Morals then we can never be sure that we can trust its teaching on anything at anytime.