Yes, Homebrew (aka brew), like all package managers, automatically installs dependencies. This is a recursive process: If the dependency itself has dependencies, brew will install them too, and so on.
brew deps
You can see the dependency tree for anything you installed using the brew deps command:
> brew deps node --tree
node
├── brotli
├── c-ares
├── icu4c
├── libnghttp2
├── libuv
├── openssl@1.1
│ └── ca-certificates
└── python@3.9
├── gdbm
├── mpdecimal
├── openssl@1.1
│ └── ca-certificates
├── readline
├── sqlite
│ └── readline
└── xz
You can see in this tree many of the things you saw in brew list.
brew uses
But to answer your question, you can go in the opposite direction using the brew uses command:
> brew uses readline --installed
node python@3.9 sqlite
The --installed flag is important, because without it the above command will list everything that uses readline, whether it is installed on your system or not. Notice also how brew uses is recursive (in the opposite direction as brew deps), showing both python@3.9 which uses readline directly, and node, which uses it indirectly.
brew desc
Now if you're curious as to what any of these installed dependencies do, use the brew desc command:
> brew desc pcre2
pcre2: Perl compatible regular expressions library with a new API
brew leaves
By the way, if you just want the short list of what you specifically installed, use brew leaves. Brew keeps track of what you installed so that it can know which things to (recursively) manage for your when you use commands like brew upgrade.
> brew leaves
git
less
node
sqlite