The main purpose of excretion is the removal of nitrogenous wastes from our body, whose accumulation in our body may cause serious hazards.
The other thing is that , not everything we eat is taken up or absorbed or utilized by our body. This remains is our body as waste . And to make way for the new waste substances, the old ones have to be removed. Thus, we excrete.