What does affiliation (for a publication) signify? This question is triggered by the (somewhat off topic there) comment thread about an employer who does not want to appear as affiliation for a paper, and the subsequent thoughts of whether an employer can deny an employee the right to give them (employer) as affiliation for a publication.

My question is whether affiliation means


the author publishes on behalf of the affiliated institution, i.e. while the author takes personal responsibility with the content of the publication, the affiliated institution also approves the work (typcially to the extent that their facilities were used and possibly they did pay the author wages for performing the work).
The relationship between institution and work may be somewhat more loose if there's a disclaimer that the publication expresses the author's personal opinions and not necessarily the insititution's.
versus 
the author is merely employed at (or associated as student with) the affiliated institution, without any implication of whether the institution approves of the work or not, did pay the employee vs. the author did it in their free time, etc. 


Or, in other words, how much of a connection to the publication does an affiliation imply?



This is similar to the questions posed in this answer. 



Edit: of course, affiliation is part of the address. But assume here that "how to contact the author" is taken care of in the correspondence (email) address.
Affiliation could mean anything, or nothing at all. In most cases it doesn't mean that the organization approves or even knows of the publication beforehand. In some companies you sign a contract that lets the organization vet your public work, but not in others and not in most universities. In those companies it usually only means that they approve of the fact that you are publishing, but not necessarily of the content. There can be exceptions, however, as when you are working with sensitive information, such as trade secrets. 

When I published, I listed my employer (a university) as my affiliation, but that was for identification purposes only. I probably still would, though I'm retired. I might, instead list none or independent researcher or my DBA (Doing Business As) persona. 

I think that publishers want it almost entirely for identification purposes, nothing more. However, for some affiliations, you have a sort of implied aura that gives the editor a warm and fuzzy feeling.