D&D's warlock isn't even a coherent concept since you can make a pact with the same stuff worshiped by clerics. Why is there a difference between a warlock, a druid, and a cleric who all get their power from a nature deity?
I've never actually played in a game that used warlocks, but I always thought the core inspiration (which I referenced above) is the warlock from the Lawrence Watt-Evan's Ethshar series, specifically
The Unwilling Warlord novel. The idea is that warlocks tapped into some unknown "source", and they could channel that power to fly, perform what amounts to telekinesis, self-heal, and so on. The more they used the power, the more powerful they became, and the easier it became to use the power, even inadvertently.
The downside is the more attuned they became to the source, the more attuned it became to them, and while nobody knew what the source really was, all warlocks knew it wasn't nice. After a certain point, they would all start having nightmares they couldn't describe on waking, which eventually became whispers they couldn't quite make out even when they were awake. Whatever the source was, it was calling them, and the call became stronger as they became more powerful. Eventually all warlocks vanished in the night, presumably flying away to the source, never to return.
From a story standpoint, it provides hubris, temptation, mystery, and eventual doom. The D&D version sounds like they added additional powers, removed most of the limitations, and shifted the source a bit to more traditional pacts of some kind. But otherwise, remarkably similar.