Food is complicated. A relative who is a chemical engineer remarked that it is impossibly complex and that he had kept away from food processing for the sake of his sanity. This complexity arises since food products are almost always combinations of materials with differing structure and rheology and that these parameters change during manufacture, distribution and storage.
Structural investigation can be a valuable tool. It can be applied during product development, troubleshooting or simply for quality control. There are a battery of techniques for finding out what is going on. These include both invasive and non-invasive methods of investigation.