I've been to Vienna before and afaik there's no walls. Now some small towns still have city walls in austria afaik but most big cities don't. How did the transition to modern cities happen? Is the answer really boring and the state just tore them down, filled the moats and sold the land as prime real estate?
I've written about this in the past! As a corollary to my flair area, I'm also very interested in historic urbanism.
The short answer is that the preservation of historic walls, like the preservation of most architecture really, depends entirely on what local authorities decide to do when posed with problems tied to modern urban expansion.
Smaller towns which did not experience rapid demographic growth can easily incorporate city walls into urban parks or promenades. But more commonly, city walls are absorbed into the urban fabric, either being incorporated into new buildings or taken apart altogether. And while cases of rapid growth or redevelopment can lead a local government to do away with altogether, other consideration can lead to the same conclusion, including costs, esthetic, and desire to facilitate modern connectivity and transport.