I did a little research and the answer is pretty interesting!
Originally, chemists assigned hydrogen a mass number of 1, and used that assumption to derive the masses of the other elements. Today we definine “1” as being 1/12 of the weight of Carbon-12 (which is very close to the average weight of hydrogen)
As to the relative frequencies, they can be different at different points on earth, this Chemistry SE answer goes into a lot more detail.
If you have never done “stoichiometry” before it may not be obvious but the periodic table average weights are essential to going from “I have x grams of substance” to “I have x number of atoms/molecules of substance” and from there you can use the equation of your target reaction to precisely predict the outcome of a chemical process. If you were doing very high precision chemistry, the differences in isotopic ratio from your sample vs the standard values could introduce an error but I would guess most of the time it is insignificant.