Roman military camps, and later Roman cities, were laid out around two intersecting main streets — the cardo running north-south, the decumanus running east-west — dividing the settlement into quadrants that could be further subdivided as needed. It was fast to plan, easy to extend, and legible to anyone who'd seen one Roman city before, since they all worked the same way.
A system, not a shape
The point of the grid was never the resulting squares themselves. It was that a grid is a coordinate system: name any point by its distance from the two main axes, and you can locate, allocate, and extend without renegotiating the whole plan each time. A twelve-column CSS grid does exactly this for a webpage — it doesn't dictate what goes where, it gives every element an address relative to shared axes, so a designer can add a new section without redrawing the ones already placed.
Where grids break down on purpose
Interesting Roman cities, and interesting web layouts, both eventually break their own grid at specific, deliberate points — a forum that ignores the block lines because civic space earns an exception, a hero section that bleeds full-width because it earns the emphasis. A grid that's never broken usually means no one felt anything was important enough to deserve the exception, which is its own kind of design failure.
A grid isn't a cage. It's a shared unit of measurement that makes everyone's individual decisions compatible with everyone else's.
Two thousand years apart, the cardo and the CSS column are solving the identical problem: how strangers, working at different times, keep building something coherent.