This method usually removes unwanted spying or stalking apps from your phone. These apps may have been installed by people close to you when they had direct access to your device.
Please be aware that these apps are not comparable to professional state trojans, which can potentially be reinstalled remotely even after resetting the phone.
Nevertheless, this option is a good start to get out of toxic relationships or to prevent stalking. Please back up your most important data before resetting.