Two people collected the data, two did the analysis and wrote the paper, three helped a bit, one got the grant which funded the lab. Or something similar.
The incentives for giving credit to everyone who participated even a bit are quite strong: in most academic disciplines you get more than an eighth of a paper's worth of 'credit' for an eight-author paper.
From my experiences in astrophysics: Second author is supervisor, third, fourth, etc. are previous collaborators of supervisor that somehow have some 'moral' claim to supervisor's work because it remotely thematically touches upon previous work they did, and thus have provided 'inspiration' for the current work. It's a racket ;)
It's quite popular in the NGO/SJW world to do informal "manus manum lavat" deals to gain credibility: you help us with our current campaign, we put your name on our future publications.
The incentives for giving credit to everyone who participated even a bit are quite strong: in most academic disciplines you get more than an eighth of a paper's worth of 'credit' for an eight-author paper.