I still have never had a dragon in a walled city. Not even on my level 59 nord with almost 200 hours. I want to see this but it never happens.
I'm not sure, but I think FT plays a role in how often this happens. That is, not only how often FT travel is used, but *where* one FTs too -- e.g., FT directly to Whiterun and/or Dragon's Reach increases the liklihood that a dragon attacks within the city walls.
Personally, if I FT (which I don't do very often) to a city, I do so indirectly via the stables. That way if the FT triggers a dragon, it'll be outside the city walls. However, in a city without proper walls (e.g., Dawnstar), this is only partially effective in that at least you *might* have the chance to draw the dragon away from the inner city.
Why FT seems to spawn the dragons more frequently, I don't know. For the most part though, from a RP perspective, I just assume that the dragons are drawn toward the dragonborn (perhaps unconsciously) and, thus, as the dragonborn you're both the savior and potential destroyer (albeit indirectly) of the civilians.
With great power comes great responsibility.However, I certainly wish the typical civilians were scripted to at least seek cover, especially indoors if possible. Watching the average citizen attacking a dragon when obvious fleeing options are available to them is definitely an immersion buzzkill.