They exist for the same reason as anything else does – there was opportunity for them. Like rain leaking through a roof, evolution found the cracks of possibility and followed them. There are tens of thousands of species of wasps, each adapted to fill a particular ecological niche. Some have complicated diets and social relationships, some do not have stingers, some are promising candidates for biological control of harmful pests and invasive species.
Wasps are actually really interesting… the species that tend to annoy humans are social wasps, like yellowjackets. Only the females possess stingers – they’re actually ovipositors for laying eggs, that are dually functional as a weapon. How cool is that? It’s easier to have respect for wasps when you think of them as clans of warrior ladies determined to feed and defend their families.
Many of them help keep pests from overwhelming crops and gardens, if you’re looking for “why is this useful to me”, and a lot of them are pollinators.