I have a friend who works at a small university with limited resources. Since he has a gift for methodology and statistics he frequently supports colleagues with their studies. He helps with the methodology and data analysis often. It is not uncommon for him to support people in Education (his field), English, TESOL, and Business since to do simple studies in these fields involves descriptive stats, regression, ANOVA, etc. In other words, basic research methods
In exchange for his support, he gets to be second author on these papers.
His concern is all this wide variety in research on his CV. His own research is focused when he's the lead but whatever his friends want to study is up to them. There aren't too many others available to help out with the technical aspects where he works at. Therefore, If he ever applies for a job somewhere else, what would a committee think of such a chaotic CV?
I can't think of a case where research or publications outside one's core area would have hurt an applicant, and would think that most departments actually think positively about it. What's important, though, is that the research and publication record within one's core area remains strong and prolific. If you only publish a paper every other year in your own area, but 2 every year with people outside your area, then a department might legitimately question how much you actually bring to their table.