Discourse installs nothing outside the container aside from docker as an installation prerequisite.
It’s likely Apache2 was installed after the last reboot and couldn’t take the port until you restarted the machine. Grep your bash history to check what packages have been installed by hand.