Publishing without an affiliation while having one There are many questions here about publishing without an affiliation. They have in common the situation that authors do not have an affiliation to use (for example they are unemployed). My question is different, an author has an affiliation, thus:

Are there downsides in publishing a paper without affiliation while working at a university? The question is general (including legal, ethical, and other aspects, such as possible career repercussions in future at the current or future affiliation).

The reason I am asking is that I know of a case of a person who was leaving a university for industry. The paper was written and accepted during his tenure at the university. The work has nothing to do with the new company. The paper was accepted just days before his new job, so he put the affiliation of the company (the reasons were also personal because he was not on good terms with the university), without the one from the university. The university was not mentioned anywhere. The company does not do any research, hence having a paper with their affiliation was irrelevant for them and for the job. I am wondering what would happen if instead he decided not to put any affiliation.

Some information:


The work has been done in private time without resources from the university (theoretical stuff that does not require anything except time and a computer, so no equipment, funds, and similar). The only resources I can think of are paywalled papers accessed from the campus network.
There is no conflict of interest, and the publication doesn’t conflict with the any work or policy at the university.
I cannot answer to each aspect you are interested in (legal, ethical, and other aspects) but I would like to mention some general aspects one should consider:


Most universities have publication guidelines which includes a paragraph about affiliations, see e.g. page 38 of the Guidelines for  research  integrity of ETH Zurich. 
University prestiges and university rankings are partly based upon publication output. Some rankings use Web of Science and a publication is not assigned to a university if the affiliation is not given in the publication.


As you mentioned that the work was completely written in private time, the situation is extraordinary. I'd suggest to talk to the professor and the university administration. At least the author should give credit to the university (library) for the literature supply.