Ami, who knows all, has found the answer to the use of Commodore. It is as you say, a spare rate, or rank, to be used in times when a spare rate is needed.
A captain is in charge of a ship, an admiral supervises more than one. A commodore must do something in between. The Navy tries so hard to be different from the army. But then there are Marines, and they try to be different from both.
They have lance corporals, and yet they no longer carry lances. It must have been a long tie since a Marine has used a lance, other than on a boil.