Yeah I was totally in the same boat, thought it was just gardening folklore. Planting marigolds around my vegetable beds made a huge difference though, way fewer nematodes and beetles. It's one of those things you have to see for yourself to believe. Now I look at my garden as a whole team instead of just separate plants.
Marigolds are like the noisy neighbor who actually ends up being really helpful... found that out when my tomato plants stopped looking so sad last summer. Guess my garden just needed a little orange security detail instead of me constantly fussing over it. Funny how the plants can do a better job than I can when I just let them be.