There are other nouns with varying forms of genitive: носков/носок (носок), сапогов/сапог (сапог). Грамм just is an example of a trend.