Ger is spear, as in Gerald
and, I suspect, Gareth
; and gard is just our word "yard" with one little sound change. So it's a matter of going back to where the original name was used, to find out which of these units was in, or most prominent in, the language of those people.
Enclosures were made for protection! Protect yourself and your livestock from wild animals and wilder humans = build an enclosure. Ask any pioneer. And then it's your own personal space, like the home of the gods. I suppose a spear is also a way of protecting, though in a very different way ... .