This isn't explained in the film. In the book, it's explained that a part of the Hab was mildly damaged in the storm that stranded Watney. From the book:
AL102 shuddered in the brutal storm. Withstanding forces far greater than it was designed for, it rippled violently against the airlock seal-strip. Other sections of canvas undulated along their seal-strips together, acting as a single sheet, but AL102 had no such luxury. The airlock barely moved, leaving AL102 to take the full force of the tempest. The layers of plastic, constantly bending, heated the resin from pure friction. The new, more yielding environment allowed the carbon fibers to separate. AL102 stretched. Not much. Only four millimeters. But the carbon fibers, usually 500 microns apart, now had a gap eight times that width in their midst.
AL102 being the Hab component that tore, it was the portion of the Hab connected to the airlock that blew off. Watney kept using the same airlock due to its convenient access to things outside. This meant AL102 kept being stressed until it tore. Again from the book:
AIRLOCK 1 SLOWLY depressurized to 0.006 atmospheres. Watney, wearing an EVA suit, stood inside it waiting for the cycle to complete. He had done it literally hundreds of times. Any apprehension he may have had on Sol 1 was long gone. Now it was merely a boring chore before exiting to the surface. As the depressurization continued, the Hab’s atmosphere compressed the airlock, and AL102 stretched for the last time.
On Sol 119, the Hab breached.
The initial tear was less than one millimeter. The perpendicular carbon fibers should have prevented the rip from growing. But countless abuses had stretched the vertical fibers apart and weakened the horizontal ones beyond use.
The full force of the Hab’s atmosphere rushed through the breach. Within a tenth of a second, the rip was a meter long, running parallel to the seal-strip. It propagated all the way around until it met its starting point. The airlock was no longer attached to the Hab.