Biological matter decomposes differently in water, especially in cooler temperatures that inhibit bacterial action and enzyme decay. In fact, wooden ship wrecks are so well preserved under water for long periods of time due to a similar process, and attempting to raise them risks accelerated decay. As organic matter finds itself under less pressure it may expand to match the new volume. While being exposed directly to oxygen the bacterial action and enzyme decay can resume. If an animal carcass exhibited the same type of pressure change as ship parts on the ocean floor rising to the surface, bloating may be slightly irregular and then exacerbated once decomposition is thrown back into its regular state. Scientists are able to identify what creature(s) makeup the majority of mass but many positive identifications of Globsters require DNA matching to be certain. Often these messy globs tend to be remains of decomposing whales or sharks, and some are speculated to be carcasses of decaying cephalopods.
Another suggested theory claims the masses to be organic remnants collecting together by ocean currents, fusing together with pressure over time, and then washing onto beaches where they're usually discovered. Globsters are an odd phenomena even when they can be properly explained. Large ocean animal remains are often scavenged at sea, either near the surface as they sink or on the sea floor, well before they have a chance to wash up on shore.
Decaying carcasses provide a vital food resource for many creatures and help create a feature of the ocean known as Marine Snow, whereby bits organic matter slowly settle to the sea bed in concentrations dense enough to appear like snow falling from the sky. Research into the subject is currently unclear as to whether or not Globsters find the world's beaches after being rejected by scavengers due to a chemical signature, by some sort of disease, or by a sequence of normal events that instead pushes the body to a shoreline instead of toward the sea bed.
† Article 9-33