No, they are of course not there to cause allergies. It is thought (although not directly proven in human) that IgE is important to fight parasites and worms. They bind to antigens from the parasites, which leads to the secretion of histamines. This causes a local immune reaction (which also is a problem in allergies) which is helpful to fight the parasites.
!enter image description here
See these papers for example:
* IgE, allergies and helminth parasites: a new perspective on an old conundrum.
* IgE Enhances Parasite Clearance and Regulates Mast Cell Responses in Mice Infected with Trichinella spiralis
* Immunology of Parasitic Helminth Infections
There is also some evidence, that IgE is involved in the immunological response to cancers:
* Activity of human monocytes in IgE antibody-dependent surveillance and killing of ovarian tumor cells.
* Animal models for IgE-meditated cancer immunotherapy