If you have
/etc/rc.local as an executable file, it will be pulled in to the boot process by
/etc/rc.local is the default path it uses, but this is set by the distribution. Because it's mainly for backwards compatibility, and different distributions were using different paths. E.g. on Fedora, the path is
/etc/rc.d/rc.local. You can check the path as follows:
$ systemctl cat rc-local.service
# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
It seems this is not very well known. There's several posts which show a previous version of the file, which has no such comment.