Confusion on docker-compose demo

Why do we need a worker container ?
is it specific that the worker container is to be of “.net”?
does all full stack applications will have a worker on them?

It depends on the requirements of the application, which in real life would be designed by an Application Architect.

The programming languages used would also be decided that way, and would depend on what languages the development team knows. That worker application could just as easily be done in java, node js, golang, python etc.