First, the most obvious answer is: Gamefreak logic
Gamefreak created it, so we don't exactly know why. It's their game, so their logic.
On the other hand, Trapinch seems to be based on an antlion which is the larvae stage of a dragonfly (Trapinch resembles an antlion, so similarly Flygon is based on a dragonfly.
Trapinch is based on the larval stage of the antlion, which live in conical sandy pits before maturing into winged adults.
Source
The adult insects are less well known, due to their relatively short lifespans compared to the larvae. Adults mostly fly at dusk or after dark, and may be mistakenly identified as dragonflies or damselflies; they are sometimes known as antlion lacewings.
Source
Since the adult stage of antlion has wings, is able to fly therefore it can whip out gusts. This is probably why—since the adult stage has wings, Gamefreak has made Trapinch's movepool similarly which is why it is able to learn Gust.
But, these are only mere assumptions. Only GameFreak knows that why since they created it, so it's likely Gamefreak logic.
Hope this helps!