One part is the wire gauge. You need something like 24awg (its the American system, don't ask me why) on the power pins (higher number, thinner wire, iirc). Most use 28 on both power and data pairs.
Then the charger has to actually follow the USB spec, not the very similar Apple one. This means either a microchip that can handle the USB handshake, or a resistor across the data pins at the charger end to signal that this is a charger (Apple has one resistor on each pin, with a slightly different resistance).
Now on top of that you have Qualcomm pushing their fast charge system that involves a chip at both ends, and higher voltage than the 5V that USB normally uses. The higher voltage allows for more watts without upping the ampere (V*A=W, iirc).
Note that the Qualcomm system is similar (but i don't think they are interchangeable) with the USB3 system (the latter can go all the way to 20V, but that requires beefy cables).
Frankly the more i think about it the more i expect to hear about someone getting electrocuted because they mistook their data cable for their dumb laptop charger.
The micro-USB connection is also really loose with this particular cable<->phone combination (cable is fine with other phones; phone is fine with other cables). Used my old Nokia micro-USB for this reason and charging was always slow, then connected the Samsung one and it was a lot faster.. for a while.
I never knew the cable could do something like this, unless it's something like being way too long. From your comment I take it that you do need a certain amount of copper in those wires to work? So more expensive cables might actually be better? (I always laughed at "gold plated extra quality HDMI cables of 30cm for 30 euros because HDMI is a digital signal.)