Lint and dirt that get pushed to the bottom of the audio jack mess with the electric circuits in it. This is most especially true if the lint is conductive. Hence, your device will mistakenly register the lint or dirt as your headphones are plugged in instead.