On cartridges such as the .30-30 Win., the name is derived from the traditional black powder loading using a 30-caliber bullet and the 30-grains of powder.
This is really an older way of describing a caliber based on blackpowder. Thus, the .30-40 Krag was a 30-caliber bullet propelled by the original 40-grains of black powder load.
The "-08" in 7mm-08 Rem refers to the .308 Win case on which the cartridge was based.
The .30-06 Springfield is a different story altogether. The "-06" reflects the date of adoption by the United States military. So there is no one definitive answer for every cartridge.