Why can't I charge a Samsung phone? I use a dual-port 2-amp charger with an Amazon Basics USB cable. This works perfectly fine to charge my Nexus 4 and the Nexus reports "AC" not "USB" as charging mode. From the recharge time it's also evident that it gets plenty of juice.

However, when I connect my wife's Samsung Galaxy S Duos then it simply does not charge at all - the battery indicator does not get the lightning symbol, and the battery really never charges (even when nothing is connected to the charger's second USB port). When I connect the same phone to my computer's USB port, it charges just fine - even using the LG charging cable! - but slowly of course. The Samsung also charges well from any el-cheapo car charger (lighter socket) as well as from my expensive 3A car charger and from my LG AC charger. 

What's the cause of this? How can a charger&amp;cable combination work very well for one phone, yet not at all for another?
In my experience, and my extensive reading on the subject, it seems to be related to the charger and not the cable, unless the cable is a non-standard USB cable.  Samsung does not use a special cable for their micro-USB chargers, only their old devices with the Apple-like connector.

The USB standard requires handshaking to negotiate more than 500 ma of current.  This is not done in a standard way outside of IOS devices, so not all manufacturers use the same methods.  I believe some Samsungs look for a certain voltage on one or two of the pins of the connector, and will not work with other chargers, but I'm only guessing.  What I have found with, for example, my Galaxy Tab 3, is that there are some chargers that will not register no matter what cable I use (including "charge-only" cables like from Mediabridge), and other chargers that will not charge it at the full rate unless I use a charge-only cable.

My wife's iphone seems to charge from all the chargers, although I'm not sure if it's at the full rate since I have no app to check.  I should mention that most aftermarket chargers are designed to work with Apple, and not necessarily Android, so this is no surprise.

My LG G2, on the other hand, seems to be much less picky, and charges from most every charger I have.

TL;DR, a lot of chargers will not work well, and it's hard to know in advance whether they will.