All plants take nutrients from the soil. If you plant garlic year after year, then the nutrients that it takes will be lost from the soil, which means it can no longer grow there. You need to rotate crops in one spot so that the nutrients used by one crop can be regenerated while another crop is growing.