Two reasons. It's a common bright color that makes it easy to find your pencil. And when pencils were first made the best graphite came from China. Yellow is a regal color in China so pencil mfg's painted pencils yellow to associate their pencil with China even if the graphite came from another location. Quality by association. Now they are yellow just because people expect them to be yellow, and some of the best art pencils are painted a different color just to make them unique.