Why is a link removed when disabling a service? (a file is not)

Yes, this is by design.

The man page for systemctl disable says:

Disables one or more units. This removes all symlinks to the specified unit files from the unit configuration directory, and hence undoes the changes made by enable. Note however that this removes all symlinks to the unit files (i.e. including manual additions), not just those actually created by enable.

Here's the link for it: https://www.freedesktop.org/software/systemd/man/systemctl.html#

It does not explain why but I can hazard a guess that it cannot differentiate between links created using systemctl enable and the ones created manually since it is looking for links that point to the unit file.

You should use the link option in systemctl when you create a symlink to a source file outside the systemd search path. Also from the same man page.

link FILENAME...

Link a unit file that is not in the unit file search paths into the unit file search path. This requires an absolute path to a unit file. The effect of this can be undone with disable. The effect of this command is that a unit file is available for start and other commands although it is not installed directly in the unit search path.

Tags:

Systemd