Why a angular container needs a exposed port to connect?

this is just a question about theory, my app is running perfectly…

So, I have 3 services runing with docker-compose: a postgres database, a backend springboot and a frontend angular.

From what I know, docker containers can acess ports from other docker containers without the need to expose the port, so there is no need to expose nor bind the ports because they are all containers and can access each other with the default bridge network mode (that’s what I learned, don’t know if this is right).

I only need to expose the port from the frontend container so I can access from my localhost.

The thing is: I can access the database with the backend (backend -> database) without the need of exporting any ports, but with the frontend (frontend -> backend) using angular with nginx, it only works with the backend port exposed, why?

docker-compose.yml:

version: "3"
services:
  ### DATABASE ###
  db:
    image: postgres:latest
    container_name: mydb
    network_mode: bridge
    environment:
      - POSTGRES_PASSWORD=envpass
      - POSTGRES_USER=envuser
      - POSTGRES_DB=database

    # It works without exposing
    # expose: 
      # - 5432
    # ports:
      # - 5433:5432

  ### BACKEND ###
  backend:
    image: angularback
    container_name: backend
    network_mode: bridge
    expose:
      - 8080
    ports:
      - 8082:8080
    depends_on:
      - db
    links:
      - db

  ### FRONTEND ###
  frontend:
    image: angularfront
    container_name: frontend
    network_mode: bridge
    expose:
      - 80
    ports:
      - 8084:80
    depends_on:
      - backend
    links:
      - backend

Source: StackOverflow