Apple released a standard for charging accessories called "Made for iPhone". You'll often see this logo on packages when you shop for accessories. Specifically, this standard ensures there's a chip in the cable that stops a power surge (in basic terms) from blowing out components on your phone. Repair shops are being inundated with repairs for the U2 Tristar chip that gets damaged when using aftermarket, cheap cables.
https://developer.apple.com/programs/mfi/
You can still buy a non-OEM cable however it must be "Certified Made for iPhone (MFi)". This chip costs about $3 to manufacture, so any dealer selling you a cable for less than $5 is probably selling you cheap knockoffs that will ruin your phone.
For what it's worth, iFixit sells certified charging cables at a reasonable price here: [product|IF116-037]