It is usually said tht a pitcher plant traps the insects for nitrogen. but sometimes if italreadyhas sufficient nitrogenin it will it trap insects.
Pitcher plant often grows in places lacking in minerals specially nitrogen. In those cases nitrogen is supplied through the bodies of the insects. If a land has already sufficient nitrogen in it, then it will still trap insects to store proteins and other available minerals.