Think of all the heavy equipment needed to clear a city lot in modern urban construction. For ancient construction crews, doing all that by hand was often prohibitively costly—far easier to knock the old building down (if it hadn’t already fallen to earthquake or time), save or sell any valuable cut stone, then level out the rest of the rubble and build directly on top of it. So you’ll often find the original foundation with the lower few feet of the first-floor walls, filled with the rubble of the rest of the building.
AskHistorians
For the fact that the city has been active for thousands of years, how do things end up getting buried?
Well, for the city of Rome in particular, a contributing factor was how total and devastating and prolonged its collapse was. It had a million people at the height of the Empire - by the end of the 5th century AD, around 20,000. Such a total population collapse led to much of the city quite literally being grown over.
In general, it's low building standards and poor waste disposal in the past. Structures were often unstable - collapsing, being destroyed by fire, natural disaster, or demolished by rampaging soldiers.
After such events, "Get rid of the rubble" is often a low priority, and the rubble ends up partly buried by soil buildup - and then the next person who builds there can't just toss the rubble in the street, and porting it out of the city is a LOT of trouble before pickup trucks - so they just literally build on the rubble. Then, as that happens, the sediment tends to 'even out' over time, thus increasing the elevation ever so slightly.
A thousand years (or two thousand, for that matter) of this can positively bury buildings - even the ones which are sturdy, simply by their neighbors being knocked down and the foundation/local elevation raised, bit by bit. Even if you never build over the structure in question, it will eventually become buried by the ground level slowly increasing around it by all of its neighbors which ARE getting demolished and rebuilt.
https://ancientromelive.org/layers-of-rome/
Does that mean the elevation of the city is higher now than it was in 0 AD?
Yes. Also, the date system goes from 1 BC/BCE to 1 AD/CE with no 0. It's weird, yeah.
I've tried to get my head around it. And part of the answer seems to me to be that everything sinks a lil over time.
Not everything—high elevations like hilltops and mountain slopes tend to erode away, while the eroded silt accumulates in lowlands and flood plains. It’s just that ancient cities (and their surrounding farming communities) were overwhelmingly built near rivers and flood plains.