Would floating cities have walls?

Been working on Megistus my arcane empire that ascended to the sky to avoid natural calamity but now I wonder would a floating city have walls?

Walls work on ground cities because most people trying to attack it can't fly but if someone could attack a flying city they'd likely be able to fly so what is the point of walls.

I was thinking about magic forcefields like the Mythallar in DND lore about the old Kingdom Nethryl.