It was a tradition in the Royal Navy, and it was spread to other Navies in the Empire and Commonwealth. Part of the idea was to get boys young before they had learned any bad habits, and train them.
And when people could leave school at fourteen (or in the early days even younger) to go into a wide range of jobs, it wasn't seen as that odd.
Quite right. If you aspired to a commission then it was to your advantage to start early as promotions to Lieutenant were tied to a certain minimum years service at sea. Fathers enrolled their sons on the ship's books, although they did not always take them to sea. But, the sons of nobility, the military, and the middle class often went to sea quite young and "learned the ropes". If under the protection of a good Captain, it helped set them up for a promising and perhaps lucrative career. But, in a bad ship, it could be a nightmare.
The world's homosexuals have been unleased against young soldiers, sailors, and Marines and the system will not likely protect them. Much on the increase in sexual assualts in the U.S. Army comes from male on male assaults with the victims being junior enlisted soldiers. Bet you haven't read that in the New York Times.
It’s now coming out how much abuse there has been in the British public (private) school system as well.
Shipping of impressionable pre-teens and teens to those who choose to work with them has always been a dicey proposition.