What, if anything, prevents the Supreme Court from perpetually denying all petitions for certiorari?
No law prevents this -- the court may use its judgement on which petitions to accept. Under the current rules, any petition which four Justices choose to accept will be accepted and given a hearing. The traditions of the court indicate various reason for acceptance, but these are not legally binding. No Court to date has failed to accept a significant number of petitions for "cert".
In addition to David Siegel's excellent answer:
Strictly speaking, if the Supreme Court did not hear any cases, (and presumably it was that there were some cases they should have heard), the Supreme Court justices could be impeached by the House of Representatives, and then removed from office by the Senate.
The relevant offenses are "high crimes and misdemeanors", which is vague by design, and part of the impeachment process is determining what specific "high crimes and misdemeanors" have been allegedly committed.
(A side note: to date, two US Presidents and one US Supreme Court justice have been impeached by the House of Representatives, but none have been removed by the Senate.)
Presumably, the President and Senate would presumably select replacements that would take more cases for consideration.
That said, in the present 2018-2019 session, the US Supreme Court has approximately 75 cases before it(https://www.oyez.org/cases/2018), which works out to a little less than a working week per case over the year.