Looking it up, apparently this has something to do with pencils being manufactured in early (1920s) USSR by an American entrepreneur:
https://en.wikipedia.org/wiki/Armand_Hammer#Career
https://i.imgur.com/vpObXqU.jpg
Eventually the Soviet government bought the entire operation from him, and thenceforth it became this:
https://ru.wikipedia.org/wiki/%D0%9C%D0%BE%D1%81%D0%BA%D0%BE...
And they probably just continued to use yellow, because why not?