The typical coral reef fish body shape differs substantially from that of most open water fishes. The latter are generally built primarily for sheer speed, and have evolved appropriate torpedo-like shapes that offer low frictional resistance (drag) to movement through water.
In the complex coral reef environment however, a premium is placed upon maneuverability rather than sheer speed. Thus, many coral reef fishes have evolved a body plan that maximizes their ability to make rapid turns, and to stop quickly.
These are highly useful traits for an animal attempting to avoid a swift predator in a physically complex environment. By quickly dodging into fissures in the reef, swiftly circling around coral heads, or coming to a sudden halt next to a solid object (like a hard coral colony), prey can more readily avoid predators that lack such abilities.
The essence of this design scheme is a deep and laterally compressed body (shaped like a pancake), exemplified by the common angelfish (pictured above).
A less obvious but critical aspect of this altered body plan includes a shift (compared to open water fishes) in the placement and orientation of the pectoral and pelvic fins.
These changes to the main steering fins of reef fishes act in concert with the flattened body shape to maximize maneuverability, including the ability to make sharp turns and sudden stops.
The only way to truly appreciate the combined effects of the adaptive changes in body architecture of reef fishes is to actually witness their ability to escape attacking predators by swiftly and skillfully using the cover afforded by coral reefs.