The congruence between rock quantity and biodiversity through the Phanerozoic has long been acknowledged. Rock record bias and common cause are the most discussed hypotheses: the former emphasizes that the changes in diversity through time fully reflect rock availability; the latter posits that the correlation between rock and fossil records is driven by a common cause, such as sea-level changes. Here, we use the Geobiodiversity Database (GBDB), a large compilation of the rock and fossil records, to test the rock bias hypothesis. In contrast to other databases on fossil occurrences, the section-based GBDB also records unfossiliferous units. Our multiple regression analysis shows that 85% of the variation in sampled diversity can be attributed to the rock record, meaning that major peaks and drops in observed diversity are mainly due to the rock record. Our results support a strong covariation between the number of unfossiliferous units and sampled diversity, indicating a genuine rock bias that arose from sampling effort that is independent of fossil content. This provides a compelling argument that the rock record bias is more prominent than common cause in explaining large-scale variations in sampled diversity. Our study suggests that (1) no single proxy can fully represent rock record bias in predicting biodiversity, (2) rock bias strongly governs sampled diversity in both marine and terrestrial communities, and (3) unfossiliferous strata contain critical information in predicting diversity of marine and terrestrial animals.