Thanks to Rastaan and V-Norrec for the defense.
If you read the top post, I said the rules aren't about forcing anyone to play a certain way to have less fun. It's about identifying things in the vanilla, unmodded game that make it far too easy so that veteran players looking to perfect their technique can do a better job.
Any game with a serious following has a crowd that wants to not just have unrestricted fun but to be skilled. You see this with mods like Fortress Defense. You can say there is no such thing as "skill" in an open-ended game, and while that's technically true, it's obvious from experience that skill exists.
A skilled player...
-Can build a defensive squad very early.
-Can get industries up quickly.
-Can micromanage dwarves and livestock.
-Can build big, cool things while still doing the above.
The point of the Code of Dwarfliness is so that veteran players can have a common ground to talk about their achievements. Take this conversation:
PENCO: Whoa, awesome tower, Urist McForumUser! How'd you long did it take you?
URIST: I had it done by Summer Year 2!
PENCO: Wow, I wish I could build things that fast. I am usually stuck focusing on getting a metal industry running first so I can equip my army. How do you manage to defend yourself?
URIST: Well, I just wall off my fort!
PENCO: derp.
In that conversation, I was hoping I had met a player who could share some tips with me to improve my gameplay, but my hopes were quickly dashed when I realized he didn't play the same way as me. You can't share strategy with someone playing by a different set of rules.
Common rules foster discussion by creating a common playing field. That's all.
Regarding Tolkien and Moria, that's a pretty lame example. In Moria, the dwarves sealed off their cavern for the sake of privacy as much as security. The real threat, as we know, was sealed in their with them. In DF, if you seal off your fort, no trolls and goblins are going to rush from beneath you and murder you like in Moria (unless you stupidly break through caverns or HFS unintentionally, which no one will do who has any experience playing the game.