Also, I did want to add that even though functionally the phones wind up in a very similar state after each of these processes there is some difference. My wife had a really odd problem taking pictures on her iPhone 5S. She could take a picture and it looked like everything worked, but the picture was never actually saved to the phone. As part of my troubleshooting, I did Erase All Content and Settings and then I set up the phone as a new phone without restoring a backup. To my surprise, the problem still existed. I then went to iTunes and restored the phone and that was able to fix the problem.
As others have said, restoring through iTunes reloads the operating system and everything, so apparently it puts the phone into a somewhat 'cleaner' state. If you're just looking to sell a phone and wipe your data I don't think Erase Content and Settings is a bad thing and it's a lot quicker and easier, but if you're having funky problems, then you might want to go all out and do it though iTunes.