Some programs use a non-zero exit code for a normal outcome. rsync returns 24 when files vanished during the copy, for example, which on a busy folder is just life. systemd sees anything but 0 as a failure.
List the codes that should count as success:
[Service]
Type=oneshot
ExecStart=/usr/bin/rsync -a /srv/data/ /mnt/backup/data/
SuccessExitStatus=24
With ExecStart=/bin/sh -c "exit 3" and SuccessExitStatus=3, the unit is simply inactive after the run, not failed. You can list several codes and signal names on one line, like SuccessExitStatus=24 SIGUSR1.
Java services are the other classic case. A JVM that is stopped with SIGTERM exits with 143, which makes every clean systemctl stop look like a failure:
SuccessExitStatus=143
The opposite setting exists too: RestartPreventExitStatus= lists codes that should not trigger Restart=, handy for a code that means the config is broken.
I’d only whitelist codes you understand. If you add a code that also covers real errors, failures go silent: no OnFailure= alert, no restart, and nothing in systemctl --failed.
Further reading: systemd.service man page