These are for SysV compatibility, which traditionally has been the most widespread init system used on GNU/Linux since its inception. I believe SysV scripts also have a degree of compatibility with BSD init, used on other contemporary POSIX operating systems. While none of that is actually part of the POSIX specification, some commonplace cross-platform software targeting a particular (linux, BSD) side of the family make use of it.
Although systemd has been around for about half a dozen years, it is only in the past 1-2 that it has become the predominant one used in the GNU/Linux world, after Debian gave up on SysV with version 8 and Ubuntu abandoned Upstart.
On Fedora, which started using systemd as the default 5 years ago, there is very little left in
/etc/init.d but it does remain, together with a
README which notes:
...traditional init scripts continue to function on a systemd
system. An init script /etc/rc.d/init.d/foobar is implicitly mapped
into a service unit foobar.service during system initialization.
service are also implemented, although things like
update-rc.d, which I think was a Debianism to start with, are not -- except on Debian (and derivatives including Raspbian). These Debian things like
update-rc.d may remain indefinitely or may disappear in the next version or so, but I expect that systemd's implementation of more core SysV commands like
service are permanent.
/etc/init.d/README on Raspbian is still the old Debian one. The Fedora one also includes this link which may be of interest:
Beware that while
systemctl list-units will show everything,
service ---status-all only applies to this that are managed via an
init.d script. There are various
systemctl commands that have parallels to
systemctl list-units [--type=service]: Will show all "active" units (note if you read the key at the end, there are two contexts for the word "active").
systemctl list-units --all: Will show all available units.
systemctl list-unit-files: Similiar to the above, but simplified.
systemctl status: Used with no service name, this shows a process tree of everything descended from an init service -- which since all processes have parents except init itself, means all running processes. This makes it similar to
pstree, but organized using the concept of "slice" groupings (see
All this is explained further in