As an experiment I planted a garlic bulb in the middle of a round “whiskey barrel” gardening container I got from a Hobby Lobby. My early beets were planted around it. While the garlic bulb itself was not a rousing success my beets (which were being grown for the greens) were left alone by the ants and other pests I constantly fight in my tiny garden. My new crop has no garlicky neighbors and the leaves are being nibbled by slugs, snails and other tiny freeloaders. I also make a spray by steeping garlic in water that helps keep bugs off my plants. Garlic is an extremely useful plant and has been for hundreds of years.
La Loup from The Woodsrunner’s Diary has an excellent video on harvesting and preparing garlic from his garden.