It's good to have 3 plants growing together.
1. A climbing vine like passionflower or morning glory.
2. A ground cover plant or ground vine like cantaloupe, pumpkin, or alfalfa.
3. A large stalk plant such as corn, dagga, etc.
The large stalk provides a climbing post for the vine and the ground cover holds in moisture at the base. The climbing vine may help stabilize the stalk plant. There are a few plants which are natural pest deterrents. I've spent the winter hibernating so if my information is a little off feel free to correct me. I'm pretty sure fragrant plants such as thyme can help to deter pests.
There are a few reasons why you'd pair plants together. Shade, preservation of ground water, to save space, pest control, and support. Other than that I can't think of any other reasons to do companion planting.