I feel as though it also represents the fact that contributors are less invested in the project. There was a small study done a few years back hypothesizing that the number of swear words related somewhat to code quality [0] due to emotional involvement of the codebase authors. I can imagine this to be somewhat true. I would love to see this study redone now that LLMs are widespread on pre chatgpt repos (as I suspect that repos created using LLMs are going to be very sanitised).

[0] https://cme.h-its.org/exelixis/pubs/JanThesis.pdf

I show my investment in projects through means other than swearing, for example through extensive testing.