I wouldn’t say that it’s only used for languages (though that is more often than not what it’s used for). Searching COCA for
ADJ command of gave me some non-language examples:
Looking in COHA (Historical!) for the same thing, I noticed something interesting. “Good command of” has little in the way of non-language results but other adjectives have more variety. “Perfect command of” seems to have been popular in the 1800s and isn’t mainly used with languages (in this corpus). “Great command of” is mixed between language and non-language results.
You can even do the same search in EEBO for even earlier results. (I noticed this gave a lot more irrelevant results though that you have to mentally filter out.) While there are still language related results, they are much fewer. I’m also noticing a bunch of “command of oneself” results, which I guess refers to self control or something.
Therefore, it looks like there used to be more variety with the expression but it all gravitated towards using it to refer to languages. It snowballs: the more this happens, the less you’ll see it used in non-language contexts.