For some jobs it is a requirement. Also at one time it paid off by several times the cost.
I am not so sure anymore.
I went to college on an athletic scholarship plus had a college job working the switchboard at night until 10. I actually made a little money after expenses.
I much later returned and finished grad school. That was a disaster for me financially. I spent all my savings, ended up drawing out my retirement and then became disabled before I could find a job.
For most people now, I don’t think it is worth it.