Speedometer cable weirdness

There is nothing weird about the inner cable pulling out. That's how you get it out to lube it. I would remove the entire cable and housing from the car and inspect it, removing the cable from the housing and looking for broken strands or snags. You could also take a look at the drive gear. But I am suspecting it is the speedometer itself, based on your symptom.