While looking at this Science paper, I noticed that a few of the authors have a lot of affiliations: the first author has five affiliations, including four different departments or programs at Harvard University, and the last author has seven, all of them at Harvard University:
I consider it immoderate, as I cannot imagine that each author has such strong links to so many workplaces (imagine what their typical week looks like, changing desk every two hours!). However, it was published in a highly-respected (and highly-watched) journal, meaning it probably is an accepted practice.
So, what is the criterion for affiliations? How can one end up with 7 different departments at the same university?
A department is paying something? If YES then the name is on the paper, it's that simple. I think that, one day, I will have to put the name of the coffee shop close to my home since it participated a lot in enhancing the quality of my research.