Yes, if you are planning to sell or give away the device, it is necessary to turn off Activation Lock before restoring iPhone software.