The diseases that garlic can attract affect legumes, by stunting their growth. Even after harvesting the garlic, the bugs can remain in the soil and can still affect the plants. This means that you shouldn’t grow beans and peas after or with garlic.