It's important to note that though this seems to happen in all fields, it is far less common in some. I rarely hear of such things in astronomy; it does happen, but more often I hear about faculty explicitly working to ensure they can protect projects for their students so their students can get the credit deserved for doing the project. I hear of professors appropriating student research in biology and chemistry more frequently, however.
The occurrences of professors taking and publishing student research is certainly a problem, is unethical, and should be stopped. But the way in which it is usually discussed ("in science") implies that it's a systemic issue across all science, which (from my experience) isn't true. This topic of credit and attribution for research deserves more nuanced discussion and fewer blanket statements.
Edit: Spelling, wording clarification.
In math, the group sizes are way smaller. A PI might only have 1 or 2 students.
In the situation you describe, the paper would probably be singly authored, and the author would write something like "Thanks to my advisor _____ and to my colleagues ____ for many helpful discussions" in an acknowledgments section.
If the contributions were more serious, then possibly the author would invite the others to co-author with him/her, and the others would then either accept (and then help write the paper) or politely decline and say "just mention me in the acknowledgments".
At least in my experience, co-authorship carries responsibilities: to help with the writing, the figures, references, dealing with editors and with submission to journals, speaking about the research at seminars/conferences, etc.
For example: Mike Synder, a brilliant biologist, 'supervises' 36 postdocs, 13 research assistants, 11 research scientists, 9 visiting scientists, and 8 graduate students (http://snyderlab.stanford.edu/members3.html - thanks to Lior Pacter for noticing it).
In 2014, he had 42 published papers. How much scientific input do you think he had on each one?
These are some working definitions, based on my experiences in astronomy:
Postdocs: researchers with a a PhD who generally have fixed-term contracts. Generally these positions are full-time research, though some may include teaching components.
Research assistants: researchers, typically without PhDs, working in a group/lab. This is frequently a synonym for undergraduate or graduate students, or interns. It can also mean people with technical skills who are working in a group/lab but not working towards a degree.
Research scientists: Non-tenure track reseachers, often with PhDs. Their positions may be fixed-term or indefinite.
Visiting scientists: Researchers whose primary affiliation is with another institute. They may be fixed-term visitors (e.g., faculty on sabbatical at another University) or frequent but non-constant visitors of an institution. Their salary is often paid by their primary institute, unless the host institute has provided funding.
I know the feeling! Astro is great and I love it. But there's lots of other things I'd love to explore once I figure out galaxies :)
Is there any research showing this standard to be fair? People pay more attention to the first item of a list than to the middle ones, making me think that one's position on such a list could have a small benefit. Less important if there are overall less multiple name papers, which it seems from the rest of your comment, but still a factor as long as multiple names on a paper do happen.
I don't know of any.
Less important if there are overall less multiple name papers, which it seems from the rest of your comment,
Actually, I think multiple authors is far more common than single authors, though I don't know the numbers to back it up. I was responding to a very specific "what-if" scenario of bouncing ideas off someone else, and describing what would happen in that case.
Astronomy is too far to reach, mathematics is too abstract to patent, etc.