The provision for exactly this type of accident is implemented, however. To prevent overloading the frame, two cockpit pressure sensors are installed with inlets on the OVHD panel. They will release the latches for the door to swing open if pressure is lost in the flight deck.
After making a similar comment, and reading about various aircraft types, it seems there are a lot of variations. Some cockpit doors hinge outwards, some inwards (but usually not both ways). Some aircraft have blowout panels which indeed fly inwards (one or more of these panels may be tethered to prevent injury to crew). Some of these doors may be multifunction (acting as escape panels).