The common narrative here is "before landfills we just threw things any old place" and as such they're a "sanitary" invention. But this completely ignores that before the modern era, plastic didn't exist and metal was considered precious (and rightfully so–it's non-disposable, can be re-forged, and is procured under extraordinarily harsh conditions, often by slave labor or other lower-caste people).
Without metals, hazardous waste, and plastics, a landfill is a just a large compost pile.