This companion planting may actually work!
I am not a big fan of companion planting, since too many times it just doesn't work to do what is claimed, despite all the internet sites making unfounded and unscientific claims.
But sometimes it does. This link explains that the sense of smell among insects is "very sharp" and is used by insects to find their favorite plant treats but can also be used to repel some insects from their favorite plants.
However, insects are not attracted to plants just because of their emitted odors but by color as well, and that includes UV colors that human beings cannot see. Maybe the trick is to confuse the insects so the introduced plant odors drown out the visual attraction -- then the insect pests can go elsewhere if you provide other attractive plants that you wouldn't mind if they're on.