What service does a pancreas perform?

Multiple functions. On one hand, it produces several enzymes needed to digest food. This is the "exocrine" part of the pancreas. On the other hand, there is an "endocrine" part that is responsible of the levels of blood sugar (through the release of Insulin and glucagon). It also release other hormones.