In the early 1800's chemists decided it was time to standardize the symbols of the chemical elements so they could all talk to each other in a coherent manner. At the time new elements were being discovered, and they decided to use the first letter of the element as its symbol; hence O for Oxygen, H for Hydrogen; C for carbon. And if there were two elements that started with the same letter they would add a small letter to the initial letter; for example: Helium, Zinc Zn, Chlorine Cl.
However, there were many elements that had symbols going back to Roman times and were widely used, so the the old symbols were kept in order to avoid confusion. For instance, sodium in Latin was natrium, its symbol Na, Potassium kalium, its symbol K. copper Cuprum, its symbo Cu, gold aureum, its symbol Au.For us, dealing with sterling silver, silver was known in Latin as argentum, hence its symbol was Ag. And my favorite is Hydro Argentum (Liquid Silver) and therefore Mercury is Hg.