Aside of the aforementioned result you will gain, making your iPhone back to its factory settings is useful if something goes wrong and you can start it over.
But remember, restoring to its factory settins will wipe your device clean. All data stored within your iPhone will be gone, like photos, music, etc. Therefore before doing anything in this post firstly backup your data first. And you can get those data back, once you have done restoring.
So let's get started, to restore your iPhone to factory settings, you need to these steps.
1. Activate your iPhone, then tap Settings, followed with tapping on "General".
2. And press "Reset" button at the very bottom part of General's screen.
3. Then tap on "Erase All Content and Settings".
4. Enter your iPhone passcode here, then tap on "Erase iPhone" to confirm the reset.
Now in your hand there is a "brand new" iPhone :D.