Trap crops are plants that can be grown in garden/farm to attract beneficial insects to protect target crop from pest attack. This kind of method is called as integrated pest management.
Trap crops help in protecting the crop from being economically destroyed. Traps cropping is being encouraged in agriculture by motivating farmers to deal successfully with the pest to reduce chemical pesticides and number of treatments required which will be more economical. Very often the pest have developed resistance to commonly used pesticides, which again require alternate strategies to control them.
Also maintaining diversity helps enhancing ecosystem services including easy pest management in crops, pollination and soil health on which agriculture production depends.