What is the criterion to include an institution as “affiliation” in an author list?
The general criterion is that you must list your primary affiliation or any institution that is providing essential funding/resources, and you may list any institution that has given you a relevant appointment (which could be called many things if it's not a real job: affiliate faculty, courtesy appointment, visiting position, consulting faculty, etc.).

In practice, the way it works is that some people collect enormous numbers of affiliations through great popularity: every department wants these people to come and interact, so they all offer appointments.  (When this happens, it's hard for the popular people to turn down the invitations, out of fear of causing offense, so they end up with a lot of affiliations.)  Other people deliberately try to accumulate as many appointments as possible, to show off how popular or interdisciplinary they are, and they achieve this by going around asking for appointments.  (And they often get them, since even if you aren't excited about someone, it's easier to give them a meaningless affiliation than to turn down their request.)

The net result is that there's no way of knowing what it means in any given case, without more information.