The slang sense is a phonetic loan from English 'goods,' routed through Japanese otaku slang グッズ (guzzu). Chinese fans heard it and picked
谷子 as the closest-sounding characters—completely unrelated to 'millet.' Treat the two meanings as homographs: context tells you instantly which one is meant.