No, each ship doesn't need its own admiral. But if you want good men to stay on active duty you need to promote them when you can. I think you'll find that the pay difference between captain and rear admiral isn't that large, and the sum of the difference in pay for all those admirals is not even a significant line item in the Navy's budget.
And rank allows people to command groups of people. For instance, Admiral Husband E. Kimmel was a "four star" admiral, highest rank available in 1941. This gave him the authority to give orders to people like William "Bill" Halsey. There was no increase in pay, the pay scale topped out at rear admiral.
It was the same with "Commodore", a rank that had no benefits over the captain rank a commodore would be drawn from. But he was senior to every captain in his command, for the duration of his assignment as a commodore.
And rank allows people to command groups of people. For instance, Admiral Husband E. Kimmel was a "four star" admiral, highest rank available in 1941. This gave him the authority to give orders to people like William "Bill" Halsey. There was no increase in pay, the pay scale topped out at rear admiral.
It was the same with "Commodore", a rank that had no benefits over the captain rank a commodore would be drawn from. But he was senior to every captain in his command, for the duration of his assignment as a commodore.