I’m not sure what this particular species uses its legs for, but from Wikipedia “One of the more remarkable uses of the muscular hind legs is the species Lasiochalcidia igiliensis, which attacks the predatory larvae of ant lions, holding the mandibles of the larva spread apart while the wasp injects an egg into the membrane of the exposed throat.”