Clearly "hi", "thanks" and other salutations are a distraction from the content of the question (and, by extension, answers). It won't do to encourage them as they'll need to be edited out either in the text itself or mentally by all future readers. Not including them in the first place is, of course, the ideal solution.
And yet humans have these sorts of conventions for a reason. I have a friend who greets others with a big smile, firm handshake and "How are you, coach?" I have another friend who finds a way to give everyone she meets a hug. And I know a guy who starts off meeting people with a serious face and folded arms. (It's a joke. He plays it as long as possible before breaking into a laugh.) These expressions let me know what sort of relationship the other person is interested in pursuing.
So when new users use words like "thanks", they are trying to convey something like:
I'm new here and I don't know the rules. But I want a positive relationship between us and so I'm trying to communicate that.
Cruelly, our culture interprets those words to mean:
I'm new here and I don't know the rules. Also, I'm not interested in learning your culture and just want to get a quick answer.
I submit that's a tragically broken interface. As an American (USA! USA!) I've visited a dozen or so foreign countries. I've used my broken Spanish, three words in Italian and non-standard English to talk to folks and in every case I've been greeted with compassion not derision. When outsiders come to a place I'm comfortable in, I similarly give them the benefit of the doubt when it comes to cultural differences. It's sorta like Postel's Law for human interaction.
So what is the relationship between askers and the community supposed to look like? Well, there are askers who legitimately don't care about Stack Overflow, just want someone to write their code (i.e., outsource their job) and mask it with pleasantries. But it's pretty hard to spot bad actors right away. Humans have a natural tendency to attribute hostile intentions in others. Wikipedia's assume good faith principle goes a long way to fighting that bias. And so, we should mentally add whatever pleasantries we'd expect to questions and edit out pleasantries when they distract from the content.