I think the main reason CLI remains popular is because it has a property that it remains usable both by humans and computers.
GUIs, on the other hand, can be used well by humans but poorly by computers.
Why would you want the interface to be usable by computers? So that people can easily delegate common tasks to the computer (i.e. automate things). Once you realize you do something often, automate it and will be trivial to do it again. Once it's automated, you can build even more powerful things on top of those automations, and achieve even more with less effort.
This comment is extremely well put. The terminal is an amazingly pragmatic and honest interface. After all, almost all manual interactions leave you wanting a way to automate. Meanwhile, almost all automated processes need the occasional manual intervention. A defined library of specific and unambiguous commands really allows for both.