I would like to ask about a situation when a research done as a part of a master's thesis at one institution is submitted for publication and published while attending a subsequent PhD program at another institution (US university). The content of the paper is mostly unrelated to the subject of study in the PhD program, and it is not supposed to be used towards earning a PhD degree e.g. by including it as part of the PhD thesis.
Is there something unethical about this? (I personally do not see any problems, but it seems better to ask anyway.)
Is this common, uncommon, rare? (It seems to me that such situations ought to arise whenever there is a master's thesis work that is to be published, because I imagine that rewriting the thesis into a journal paper form would be usually done only after the thesis defense, hence usually during another PhD program. Yet I do not know of any such cases personally.)
In that case, should one list as the affiliation the present institution (i.e. the university of the PhD program), or the institution where most of the work has been done?