Exactly, for simplicity since nothing is in there by default, it gets overwritten. To keep the script nice and short I decided not to add that detection. I would happily merge the change if someone decides they care enough to add it.
if [ $(grep "HiddenServicePort 22" /etc/tor/torrc | wc -l) -eq 0] if grep -q "HiddenServiceDir /var/lib/tor/onion-ssh/" /etc/tor/torrc