Why don't all ants have wings?
Certainly ants evolved from insects that could fly.  All the earliest wasps (ants are specialized wasps) could fly.

Building and maintaining wings is expensive in terms of energy.  That's an obvious evolutionary advantage to not having wings.  So if there's insufficient benefit from having wings then there's selective pressure against having wings.