Historical Reference
In sailing warships all commands were passed by flags. The ranking, or commanding, officer was in the middle of the formation. The second ranking officer would take the point, at the head of the formation, and the third ranking officer would take the rear of the formation.
The powder used for cannon would quickly obscure warships.
If the signals could not be seen by the ships under the another officer's command, he would take over command of the ships who could see his signals, otherwise he would repeat the signals of the CO.
At the squadron level command was held by a Commodore. At the fleet level it was an Admiral.
For some reason the term or rank of "Rear" stuck, while the term "Fore" was dropped if favor of "Vice".
Rear is the entry level rank for flag officers.