There is actually a real answer to this!
They are both based off of a real bug called an antlion.
According to their Bulbapedia Pages,
It [Trapinch] is based on the larval stage of the antlion, which live in conical sandy pits before maturing into winged adults.
Vibrava is based on the adult stage of an antlion. Often the adult antlion and dragonfly are confused with one another, and Vibrava could draw inspiration from both. In fact, some species of dragonflies are commonly called "sand dragons", which could account for Vibrava and Flygon's type combination.
Thus, it is easy to see how the evolution makes perfect sense.