After a lot of use the ports can get really dirty, to the point where I have had Macbooks not taking a charge/powering on because the MagSafe connector had crud in it. Rubbing alcohol and an old toothbrush work great.
The thunderbolt port as well as the new lightning port on iOS devices have the same problem: As with all ports, dust and lint that are always floating around in the air and coming off of your clothes tend to settle in there.
Unlike looser fitting ports like USB, these ports are so tight that they compact dust and lint. Over time it builds up, and it is impacted - jammed in there like cement. Compressed air won't get it out.
I've had to take mine to the Apple store. They have tools that are just the right size, shape and hardness to pick out the impacted debris without damaging the ports themselves. I believe they may also have illuminated high-power magnifying glasses so they can see into the corners. The thunderbolt port in particular is tough because it has a tab in it, and there is less than 1mm clearance between it's narrow edges and the side of the port.