I have done no research or anything, but I'm thinking
gard "enclosure" could be a later meaning evolution of
gard "protection". After all, an enclosure is often built to
protect whatever you're enclosing (either from being stolen or from having a living thing wander off into trouble, or whatever).
Miranda