Chaosmancer
Legend
Why are you assuming they have no military or defenses? They aren't typically bent on conquest, there's nothing that says they don't defend themselves. It's not like the structure of military or defenses is spelled out for other races unless they are specifically militaristic like hobgoblins.
It's going to be campaign dependent. Some halflings may live in a dangerous area, others are going to be settled in a peaceful community.
Because that is kind of what Mordenkainen's tells us.
For the most part, halflings aren’t the targets of warring nations. Their villages are of little tactical value, nor are they likely to be coveted by evil wizards or to become the object of wrath for some dark force. The only enemies that a halfling village must watch for on an ongoing basis are roving bands of orcs or goblins, and the occasional hungry ogre or other solitary monster. And, as halfling luck would have it, these incidents are so rare that a single one might be talked about for generations. In one village, the story of the ogre that ate Farmer Keller’s billy goat is a cautionary tale that will be repeated and embellished for decades.
From time to time, halflings must fight to defend their friends or their village. In those moments, the tales of Arvoreen come to the fore in every halfling’s memory. Every youth hears over and over again the stories of the hero’s bravery and cunning, his clever tactics in battle, and his ability to use speed and smallness to defeat a much larger foe. The elders know that the world outside is dangerous and that their kin must understand how to deal with those dangers. Stories about Arvoreen are told in such a way that youngsters are inspired to act out his epic battles. In this way, the halflings get practical experience in executing measures that are designed to help the halflings defeat kobolds and goblin raiders, or even take down an ogre. When the time comes to put those tactics to use in earnest, everyone will be ready.
Cooperation is a fundamental principle in how halflings fend off their enemies. Every community practices its own version of Arvoreen’s favored tactics:
Scatterstrike. The halflings run in every direction as if in a panic, but then they regroup and circle back to attack with a concentrated effort.
Turtle Shell. Halflings cluster together and cover each other with shields, washtubs, wheelbarrows, coffer lids, or anything else that can deflect a blow.
Troll Knocker. A few halflings act as bait to lure a troll or other large creature into a clearing where the rest of the group can hurl stones at it from concealment to confuse the monster, persuading it to seek other prey.
Swarming Stickwhackers. Halflings rush an intruder in waves, swatting the enemy with sticks on all sides.
Fiddle and Crack. A halfling fiddler lures the monster into a trap, usually a net or a pit, followed by several burly halflings wielding large sticks and hitting the monster from a safe vantage.
Sure, the halflings have tactics, but read them. They are mostly "The entire village hits it with sticks and rocks". There is no mention of using bows, wearing actual armor or using actual shields. They... don't have a military defense. What they have is luck that just means these type of things never happen to them.