Insectivorous plants trap insects because they grow in soil which is usually thin and is also poor in nutrients such as nitrogen. They trap insects to fulfil their nutrient requirement.
Examples of insectivorous plants are :
venus flytrap, pitcher plant.