Marigolds do not keep cucumber beetles away. Many plants are often used as companion plants in vegetable gardens to reduce pest issues. Some companion plants deter insects, some increase pest predator populations, and others mask the smells from certain garden vegetable plants. Marigolds work as companion plants by increasing natural enemy populations in your garden.