Script-doctoring can be quite lucrative, especially for the better known writers. David Mamet and John Sayles, for instance, fund the movies they direct themselves, usually from their own screenplays, by writing and doctoring scripts for others. In fact, some writers make very profitable careers out of the script doctoring food chain, being the ninth or tenth writer to work on a piece. In many cases, working on projects that never see exposure to an audience of any size.
Most professional screenwriters are unionized and are represented by organisations such as the Writers Guild of America. The WGA is final arbiter on awarding writing credit for projects under its jurisdiction.