"douchebag" literally derives from the term associated with someone filling a paper bag with feces, either their own or of an animal, and then proceeding to set that bag on fire and leave it on a doorstep of someone's house who is deserving of such a gift.
If the term "douchebag" is said ABOUT a person it is the equivalent of calling them a flaming bag of poop.
"Ben is a total douchebag for hitting on Samantha when he knows I wanted that hot mess."