The main reason to substitute garlic for something else in pesto is the taste. If you're not a fan of garlic, the strong flavor can be off-putting. If you're making pesto for your family and they have similar tastes, it's more likely they'll enjoy your cooking if you omit garlic.Another reason to leave out the garlic is texture. Pesto consists of a few very small ingredients that are all chopped up extremely fine, so the taste and texture of each one are magnified by the others. If you've ever had garlic that's been chopped or minced incorrectly, you probably know how much it can stand out on its own. It can be pretty unpleasant to bite down on a big chunk of it in your sauce, so eliminating it from a recipe like pesto makes sense.If you find that any of these reasons to exclude garlic from your pesto apply to you, I'd definitely recommend trying some alternatives instead!