There are many forms of inappropriate authorship, and some of them happen when people are listed as authors even if they did not contribute significantly (guest or gift authors), or when people who did do the work do not get the credit (ghost authors).
Getting authorship credit in academia is important because it’s one of the main ways how other researchers and institutions evaluate your work. Among other criteria, institutions seek employees based on the number of articles published, and authorship is a criterion for getting promotion or tenure. In the end, authors are researchers who guarantee for the data in the article, and can be held responsible for their work. In medical sciences, practice of ghost-writing can happen during the clinical trials, where experts from drug companies (writers or statisticians) contribute to the research or manuscript writing, but are not listed as authors because of their conflict of interest. Sometimes, senior researchers, supervisors and laboratory leaders, who do not fulfil the authorship criteria end up listed as authors. That is called guest or gift authorship and is usually done to increase the chance of manuscript publication.
PhD Students, Principal investigators, Researchers, Industry stakeholders
A lot has been said about authorship. One of the milestones in tackling authorship are the famous four criteria of the International Committee of Medical Journal Editors. That means that those who fulfil the ICMJE criteria should be listed as authors (to avoid not giving credit when credit is due and to avoid ghost-writers), and authors should fulfil all of those criteria (to avoid guest and honorary authorship). Researchers who fulfil some, but not all four criteria should be acknowledged in the manuscript.
When submitting research manuscript, journals will often ask for the statement of authorship, signed by authors. That way, journals’ editors want to make sure all authors have been informed, and they can be held accountable if any problem arises.