If you don't set the mode, it will not work. No, it is not hazardous. No, you do not need to clean up GPIO after the script runs. Indeed, if you do so, the servo will not work properly.