Cells are not just the structural building blocks of an organ, but, they can perform specific functions within that structure. For the pancreas example, certain cells that secrete juices destined for the small intestine organize themselves along ducts to secrete the fluids they produce directly into the ducts. Another example is the Organ of Corti (CORE-Tee), a fascinating piece of anatomy of our ear. Shown here in cross-section of the cochlea if you unwound it into one long tube and sliced it perpendicularly to the length of the tube (think of slicing cookies from a roll of dough). The HAIR CELLS (pink finger-shaped cells) within the spiral of the cochlea are arranged along the spiral length so that higher frequencies that only travel a short distance through the fluid are triggered by the cells closest to the opening or entrance, while lower frequencies that travel further distances are triggered by those toward the end of the tube or center of the spiral. The hair cells then change the sound vibrations to electrical impulses that the auditory nerve then relays to the brain for interpretation.
So think about how remarkable it is that not only do cells conform shape-wise to fit the structural necessities of an organ, but they further organize positionally to serve that organ best, while being machinery within that organ to perform the collective function of that organ!