/dev/tty is one of the three standard device files specified by POSIX (/dev/ beingis one of the three standard directoriesdirectory names specified by POSIX). Opening it is equivalent to opening the controlling terminal of the current process. The controlling terminal is set when a process first opens a terminal, at least on Linux. For example, in init, it would refer to /dev/console.
Detaching from the controlling terminal is one of the steps traditionally required to start a background process, for example a system logging daemon. The steps to become a background process are horribly intricate, but to be specific, the step which detaches from the controlling terminal is the setsid systemdsystem call. In more modern systems, the init system e.g. systemd starts the service without any controlling terminal in the first place.