There is an entire protocol to negotiate power delivery (including who charges who) http://www.usb.org/developers/powerdelivery/
Or, if you're really unlucky, it'll attempt to charge your wall. No, I'm not joking: https://twitter.com/chimeracoder/status/941820122406064128
:-)