Remeber that English is an amalgam language. It draws heavily on other languages for many of its words -- Latin and French especially.
It probably was the British who started designating guns like this, but it could have been the Americans, as well. As far as I can tell, it started sometime around the 1870s or 1880s.
The reason is simple, but the process is confusing as hell...
In the days when cannons fired iron balls, you could designate them by ball weight. There were other descriptive terms for the tubes (carronade, demiculvern, blah blah blah), but a 24 pounder was a 24 pounder pretty much the world around, because an English 24 pound iron ball would be roughly the same diameter as a French 24 pound iron ball.
When shell firing guns entered service, there was an attempt to maintain the old gun nomenclature, such as the Armstrong 110-lb shell guns that were mounted on the Warrior, but it was realized early on that it wasn't going to work nearly as well. You could have two guns, but 110 pounders, but because they fire elongated, hollow shells instead of spherical iron balls, the calibers could be quite a bit different.
In American usage, especially during the Civil War, the two systems overlapped. You had the standard artillery piece, the 12-pound Napoleon, designed in the days of solid iron shot. But you also had the shell firing Parrot rifle. The interesting thing about the Parrot? It was often designated by BOTH shell weight and caliber, such as the 3"/10 lb Parrot rifle that was a standard field artillery piece,
In British service, the field artillery still used the old nomenclature right up through World War II and beyond -- 17 pounder, 25 pounder, etc. But at the same time, they also started mixing in both inch AND metric calibers in the designations. Confusing, no?
Try this on for size... 17 lb, 76mm, 3". All refer to the 17-lb anti-tank gun mounted on the Sherman Firefly tank.
Or, 25 lb, 3.95" gun howitzer.
OK, I've gone pretty far afield, so let's get back to the question of Naval usage.
As I said, I've seen references to this system in Naval usage in the 1880s with the new classes of American battleships.
I think the main reason is because you could have several classes, or marks, of say 5" or 7" or 12" guns in service at the same time, and depending on the age of the ship on which the guns were mounted, they might take different shells. Using the caliber, in inches, and tube length expressed in calibers, was a handy way of letting everyone know EXACTLY what gun was being talked about, and what type of ammunition was required.
This was especially important during WW II when in the early days there were at least 3 types of 5" gun in service -- the 5"/25, the 5"/38, and the 5"/51. Possibly there were others, as well. The 5"/25 used fixed ammunition, while the others used, I believe, semi-fixed ammo. If you told the QM that you needed 5" ammo for the guns on your ships, especially an older battleship, you could be requesting either 5"/25 ammo for anti-aircraft use, or 5"/51 ammo for the secondary batteries.