Like spelling 'dammit' correctly -- with two m's -- it's a troll that works best on the most literate.
"No pun intended" is an idiom meaning that something just said wasn't meant to be a pun, implying that the preceding statement could be interpreted as one. As done in the comic, following a non-pun with "no pun intended", although factually accurate, breaks this implication and confuses listeners who will be trying to work out which part of the sentence could have been interpreted as a pun. This could be a form of Nerd Sniping, similarly to 2032: Word Puzzles
In this comic, which is part of the My Hobby series, Cueball uses this tactic to confuse Beret Guy, who spends the next three hours trying to understand what pun there could have been in Cueball's sentence: I think he's internalized his girlfriend's attitudes.
The guy Cueball talks about seems to have taken over (internalized) all his girlfriend's attitudes, values, standards and opinions, putting these instead of those he has from his own identity or sense of self. This is probably sad, but there is no pun in the sentence.Beret Guy, however, has been fooled by the addition of no pun intended and tries to overanalyze the sentence - did Cueball mean Lied when saying Internalized or was it Analyzed or even Attitudes he meant; could that be the pun? Since there was no pun, he will never find a solution. This was Cueball's plan all along.
It seems like Beret Guy, after three hours, finally gives up when he says Dammit. This then leads to the title text joke.
Unfortunately for the hobbyist, blank puns default to sexual innuendos, the most notorious example being "If You Know What I Mean."
The title text elicits a similar confused reaction, as the most literate people will be more likely to want to spell out "damn it" rather than using the also correct abbreviated form with morphed spelling, dammit, which is referred to as with two m's because many people (mainly in the US it seems) contract damn it to damnit, which is the "wrong way".
This way of confusing people and messing with their brains is normally an action done by Black Hat, xkcd's resident classhole. The reason Cueball is shown is probably because Randall uses Cueball to represent himself.