Big difference, humble, like other stores, is a key seller. There are plenty of legit ways to get e.g. Steam keys from stores that have a partnership with Steam. Humble, Gog, and lots of others sell completely legit keys.
Sometimes indie even include a Steam key themselves if you purchase their game from elsewhere, like their own site (like Rimworld) or itch.io (like Dwarf Fortress).
The shady part with G2A etc, the resellers, is that they get their keys from... anywhere really. They buy and resell "second-hand" keys and don't care where they may come from, which is why some end up cancelled when the publisher discovers they were acquired illegally.
And especially among small publishers and indie, the resellers are a huge pain in the ass because in the end cancelling the keys is their decision, and they know it won't be popular. Most of the time the end user believes the game is being unjustly removed from their library because they have paid for it. Many don't even realize that it matters who is being paid.