Well, they don't all die that way. But many succumb to the laws of physics in their final moments. It's at that point that normal blood flow stops, the legs contract, and the bug gets top heavy. Inevitably, it falls over onto its back.
Of course, a stiff breeze or a curious pet can have the same effect. And once it finds itself belly up, it can be pretty tough for an insect to get back on its feet.
Bugs can normally rock themselves upright. But if it's injured or it's weak or it's sick, it can have a really hard time coordinating its limbs. And even more so if a pesticide is disrupting its nervous system. That will cause spasms and ultimately, a total system shutdown.
Critical thinking challenge: Which law of physics do most dead bugs succumb to?