I disagree that a hill giant isn’t a threat to a vaguely prepared village.
Let’s work this out. A village would be like what? 10 households grouped together? So they have a population of slightly more than 100. Of course, most of these people are non-combatants (too old, too young or infirm). Let’s say 40 combatants altogether.
And I'm going to stop you right there. There's a difference between a combatant and a front line combatant. The ability to e.g. fire a crossbow doesn't require that much.
It’s an agrarian society, so most of these people will be in the fields (all sexes). A hill giant is 10’ tall, so they would probably first see him shortly before he crosses the tree line of the fields.
Let me stop you there. In 5e a hill giant is not just slightly bigger than an ogre. They're 16' tall according to the Monster Manual, and huge creatures rather than large. They're actual giants (and it's one of the 5e fluff changes I fully support).
Fortunately for the giant it's a hill giant, not a plains giant. Which means it can get relatively close.
The villagers are vaguely organized, so instead of attacking the giant right there with the implements they have, they rush back to the village.
The villagers are vaguely organised and they live in the sort of country a giant is likely to live in. However what the giant finds first isn't a farmer but a herdsman with a flock of sheep or goats. Part of the point of having herdsmen is the early warning they provide. And the herdsman always carries two things. The first is a sling, primarily for driving off wolves. The second is a horn (made of horn) so they can call for help or alert the village.
At this point most giants will be looking to steal a sheep or a goat, which I agree they can do relatively safely. And naughty word happens. Losing a goat every week or so to a giant is a problem, but it's not village-threatening.
The giant rushes after them, and due to his greater movement, probably kills s couple on the way there.
If the giant is particularly homicidal they get the shepherd/goat herd. But the horn has been sounded.
One villager goes to the centre of the village and rings a bell (vaguely organized) to warn everyone that there is a giant attack.
Already done unless the shepherd in particular was known for crying wolf. They heard that horn. And it got passed on. The warning's passing at almost the speed of sound.
The others go to their homes to grab what weapons they can find.
"What weapons they can find" - your village is a bunch of utterly clueless twits who leave their weapons buried under the junk? When they live in giant country?
While this is happening, the giant is rampaging through the village, killing people and destroying property.
Did he teleport? The giant has barely killed the shepherd by the time people are grabbing weapons.
Now most families are at home (ostensibly getting ready). They don’t have time to don armor (and none of them have armor anyway). A couple may have shortbows, but most of them have staves, clubs and hatchets (maybe a few scythes as well).
We're in hill country and the call has gone out for "giant". The weapons of choice are bows, slings, and javelins with hatchets as a last resort.
So, do they sally forth and attempt to kill the giant?
Of course not. They pepper that giant with sling-stones and a few arrows when it comes into sight. No ones grabbing staves or clubs. They don't want to get into range of that thing.
So you end up with 10 AC 10 commoners fighting a hill giant. A couple with ranged weapons, most with melee.
Almost all with ranged weapons. Slings are dirt cheap and in D&D count as simple weapons. If it's a particularly dangerous area most of them might have slings already on them.
If we assume half your "non-combatants" are Str 8 Dex 8 and have slings so can do damage that's still 30 slingstones that need 10 or more to hit (vs AC 11; +2 proficiency, -1 stat bonus); the non-combatants between them do an average of 28.5dpr at short range (accounting for crits) or 13.8 dpr at long range.
The giant lasts around 4 rounds against the non-combatant slingers if he closes to short range and 8 if he stays at long if they get to focus fire.
Maybe at the end the villagers prevail. I’m betting that you are going to end up with a lot of dead villagers even if they do.
Or around half the "non-combatants" take the giant down and only lose half a dozen. It is, of course, faster if you get the actual fighters involved.
And maybe the families of those dead villagers starve come winter because only the extremely young and the extremely old are left to run the farm.
Possibly the foolish ones that don't use slings and that rush down the throat of the giant rather than trying to shoot it from far away. Yes, villages that are that badly prepared and live in giant country might get wiped out. Of course so do the giants.
Now a town with walls and an organized militia probably wouldn’t be too much at risk from a single hill giant, but I would argue that this is as intended.
No walls and organised militia needed. Just proficiency with simple weapons and not doing anything stupid.