Are USB's Data+ and Data− needed when just charging?
Many USB powered devices use these lines to recognize charger.


  Most Android devices detect a charger looking for direct electrical
  connection between D+ and D- pins (DC resistance 200 ohms maximum). If
  they found it, the device draws the maximum current allowed and
  battery charging is quite fast. If not, they assume they are connected
  to a computer USB port and charging current is usually quite low,
  taking an eternity to charge the battery or even no charging at all.


Source / more information: link

So, for some USB powered devices you can remove D+ and D- connection, but some may require it to enter "charging mode".