Some Linux software works by listening for incoming connections. A simple example would be a web server, which handles user requests whenever someone navigates to a website. As a Linux administrator or user, it's important to always know which ports of your system are open to the internet. Otherwise, you could be unaware of outside connections being made to your computer, which consumes bandwidth and resources, along with being a potential security hole.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-check-for-open-ports-on-ubuntu-linux