This single cavity and its lining serve apparently for all those functions (digestion, excretion, circulation and often reproduction) which in more complex organisms are distributed among various cavities of independent and often very diverse origin.
This, like the excretion of the sundew and other insectivorous plants, contains a digestive ferment (or enzyme) which renders the nitrogenous substances of the body of the insect soluble, and capable of absorption by the leaf.
Side being the one chosen for a reason we cannot now fathom; it may be that fixation was facilitated by the presence of the pore on that side, and by the utilization of the excretion from it as a cement.
When a fly is captured, the viscid excretion becomes strongly acid and the naturally incurved margins of the leaf curve still further inwards, rendering contact between the insect and the leaf-surface more complete.
In the case of many Oligochaeta where there is no vascular network surrounding the nephridium, this function must be the chief one of those glands, the more elaborate process of excretion taking place in the case of nephridia surrounded by a rich plexus of blood capillaries.