Well, they don't all die that way, but many of them 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 even more so if a pesticide is disrupting its nervous system, causing spasms and ultimately, a total system shutdown.
Critical thinking challenge: Which law of physics do most dead bugs succumb to?