The Greek figure and/or rhetorical device is antimetabole, as the have-need-need-have creates an obvious ABBA pattern using the exact same words (which distinguishes it from a chiasmus.)
This is, also, a snoclone. It’s a snoclone of “Tis better to have loved and lost Than never to have loved at all.” -Alfred, Lord Tennyson
See and read about this quote and others at QuoteCounterQuote.com.
Click a tag below for more examples.