as far as I know, smoking tobacco hinders those hairs in your bronchia from transporting phlegm upwards, so after quitting they are more enabled to expell the dirt you put down there smoking cigs. so coughing up even more shit after quitting doesn't sound too off, if you have been a heavy smoker.
I hope this explanation isn't totally wrong, just based on things I have heard.