I have long known that the plural of major general is major generals and that the plural of attorney general is attorneys general, but I had never given much thought to why one is pluralized differently than the other. Why would an s be added to general in one case but not both?
Patricia T. O'Conner explains it very nicely in her helpful book Woe Is I. She says it's because in a military rank, it is the general that is the key word, while in attorney general, it is attorney that is the key word. In the latter instance, the word general is a modifier, not a noun. It is the noun that gets pluralized.
This brought to mind C. Everett Koop, who was surgeon general of the United Stated back in the 1980s. Koop took to wearing a military-style uniform that seemed rather amusing at the time. It is even more amusing now that I realize that the general in surgeon general is just a modifier. Koop was not a general in any sense, but just a general surgeon. That is an important position, but it hardly justified wearing a military uniform.