The Stack Exchange network users are not encouraged to leave comments expressing thanks.
Please do not add a comment on your question or on an answer to say "Thank you". Comments are meant for requesting clarification, leaving constructive criticism, or adding relevant but minor additional information – not for socializing. If you want to say "thank you," vote on or accept that person's answer, or simply pay it forward by providing a great answer to someone else's question.
Given some people are taught from a preschool age to express thanks and this practice is reinforced throughout a lifetime. So coming to an online community can be difficult for some people not to express thanks.
What is happening psychologically when an individual has immense discomfort (to a point of preferring the discomfort of not complying with the wishes of an online community), that is almost compulsive in having to continue with an instilled social habit, such as expressing thanks.
Nb To me, it could be related to cognitive-dissonance, but this doesn't seem to be the correct term.