Withdrawal of a research paper after submission but before publication and during peer-review or even after acceptance is an uncommon event and not considered as a good scientific practice. Before withdrawing a paper, it should be considered that reviewers and editors have already invested significant time in finalizing of the manuscript.
Once the manuscript submission process is completed, the next step, i.e. initial review of the paper by the Editor followed by peer-review by the invited experts begins. During these steps, the researcher should wait for the final decision. However, in some cases, one may want to withdraw the manuscript. For instance, you may want to revise or add important points or may want to correct some errors which are discovered after manuscript submission. In these case, the manuscript needs to be withdrawn much before the peer-review process starts.
Another common reason to withdraw your manuscript is that authors discover or suspect a glaring error, possibly while checking the proofs. This error may require performing some experiments again or removing existing data set. It may call for doing some supplementary analysis. This may lead to additional work, but it can help the researchers to avoid any future retractions. If the authors do not want to make all research data available for commercial reasons or copyright or when they realize that they have made manuscript submission to a potentially predatory journal, here also authors can withdraw their paper. There are unethical reasons for withdrawal of a paper like being unaware of the publication fees or just wanting to submit one’s manuscript to a higher impact journal.
Another reason for withdrawal of research paper is impatience with peer review process. This process is not a black or white issue. However, there are journals who take a long waiting time for completion of the peer review process. Some complete it within 1-3 months, whereas some take 4-6 months. Even if this is the case, the time period of peer review is mentioned in most of the journal websites. Thus, retraction based on the time period can be unreasonable at times.
In particular, after acceptance of manuscript when the journal and referees have behaved blamelessly, as an author it is hard to justify unilaterally withdrawing the paper. When the paper is submitted, the writer implicitly agrees to publish it there if accepted. A submitted manuscript is a request for publication and not a request for the option to publish. It is not ethical to withdraw a research paper which has been accepted. In the publication process journals, reviewers and editors have spent time. To withdraw a manuscript after it has entered this process is a waste of their time. However, the legal ramifications of this behaviour are probably limited.