But even a lawyer specialised in criminal law will have gotten a broad education in contract law, property , civil procedure.
In my engineering school, mechanical engineers were taught the basics of electrical engineering.
There is a lot of value in gaining a good amount of breadth before specialising, even if just to ease communication with specialists of adjacent fields.