All pipeline steps, including services (which are just pipeline steps with some syntactic sugar), are containers that execute in the same Pod. All containers in the Pod use the same network, and you cannot have multiple processes try to open the same port on the same network. The reason you can refer to the services using localhost or the service name is because we merged this patch that creates a host alias, mapping each service name to the localhost address.
This is no longer the case. An early version of kubernetes pipelines executed each pipeline step in a separate Pod, however, the approach was flawed. The problem was that you could not have multiple services of the same hostname running at the same time in the same namespace, which prevented multiple pipelines from running concurrently. We initially tried to workaround this by creating per-pipeline namespaces, however, we received overwhelming feedback that per-pipeline namespaces were not desirable.