Just Plane Wrong: Although the film treats looping a helicopter as aerodynamically impossible, this is not actually the case. It depends more on the performance characteristics of the aircraft in question than an absolute rule of physics.
Most helicopters (including the Gazelle) cannot successfully loop because the rotor is mounted directly to the transmission and engine, and the powerpack would rip itself out under the stress of the loop. The Apache and many other modern combat attack helicopters have the rotor mounted on a bearing attached to the airframe, and the driveshaft is separate, so it can handle higher stress, and can pull a loop.
What Could Have Been: The original concept for the film was something along the lines of Taxi Driver in the air: Murphy was to have been a police helicopter pilot who went on a psychotic rampage through the skies of LA. This gets reused as the cover story for why the police and Air Force want to shoot him down.