The dry graphite will gravitate to the bottom of the cable and leave the core high and dry. Also, there is no way for dirt to get into the speedo cable when it is installed in the tranny and speedo.
Even a good lithium wheel bearing grease is better than dry graphite. There is a graphite grease you can get for lubing dead centers in a lathe but I still don't recommend that for speedo cables.