Because with a programming language, you can learn how something works and implement it yourself without copying the implementation. Your implementation will have a similar underlying algorithm but enough differences that it wouldn't be a copy. Algorithm (that is probably not copyrightable) and implementation (that is) are separate. You can use the implementation or you can learn the algorithm and implement it yourself.
With CLI tools, however, there is only one way of doing most things. There is no OOP vs functional, no loop vs comprehension, no choice of data structure, nothing. So commands being copyrightable implies no one can do certain actions with the CLI without a license. Because the only way to do those actions are with the exact command that was copyrighted.