Originally Posted By: mlord
It then unlocks the bootloader, and finally installs a custom ROM. I am not year clear on whether that last step is necessary -- maybe the SuperSU app never gets installed unless the custom ROM is loaded to "see it" and install it?

This doesn't install a custom ROM, i.e. Android. It installs a custom recovery ROM. And the script doesn't install SuperSU. It just copies it to the SD-card so that you can install it through the recovery console.

Unlocking and rooting shouldn't bring it back to to factory reset either, so you shouldn't loose any data by doing it. Installing a custom ROM, e.g. CyanogenMod will make you loose your data (since one of the steps is to wipe Data and Cache).