Lao Tzu said this quote

One gains by losing and loses by gaining.