Etymology
Today it means: In an undeserving way. Full definition →
From undeserving + -ly.
Etymology from Wiktionary, CC BY-SA 4.0.