If only it was "public opinion" that was being rejected.

In the 1960s, the Vatican created a Commission that studied the Church’s teaching on contraception.  That commission included theologians, doctors, scientists and married couples.  The commission members were not radicals or dissidents, but educated and respected Catholics who took their assignment very seriously.  After much study, discussion and prayer, the Commission issued its majority report, concluding that contraception was not intrinsically evil.  51 of the 55 who voted supported this conclusion, along with seven of the eight cardinals appointed to examine the report independently.

True, the Church is not a democracy.  Neither was the Commission.  It's members were hand selected for their knowledge, expertise, and commitment to Catholicism.  It's one thing to dismiss the findings of an random poll.  It's something else entirely to dismiss the conclusion of respected, Vatican-appointed experts.