Etymology
Today it means: In a gainless manner; unprofitably Full definition →
From gainless + -ly.
Etymology from Wiktionary, CC BY-SA 4.0.