Just like with speech, thoughts aren’t only about their literal content but also their function. Morin et al (2011) found that one function of inner speech was self-motivation. Some inner outbursts do serve to boost confidence by self-praise (“that was brilliant”!) or motivate corrective behavior by self-chastisement (“that was stupid”!). Sometimes we replay moments of triumph; other times we replay moments of failure. The former motivates approach behavior – confidence to keep going; the latter motivates avoidance behavior – let’s not do that again, along with consideration of counterfactuals and alternative, potentially more successful, behaviors.

Reference:

Morin A., Uttl B., Hamper B. (2011). Self-reported frequency, content, and functions of inner speech. Proc. Soc. Behav. J. 30, 1714–1718