When do researchers decide to be listed as last author?
This depends a lot on the field, but for many sciences and engineering the following is (at least to some extent) true:


The amount of work invested into the manuscript decreases with position in author list.
The amount of responsibility/funding for the project increases with position in author list.
If a publication has many authors, the ones in the middle are probably the ones with least significance.


The first author usually wrote the most of the manuscript and submitted it. These are PhD students. For some programs, first-authored publications are a requirement, therefore it is desired by many PhD students to get the first place.

The last author(s) are usually the supervisors and professors overseeing the research effort. They probably took part in discussions, maybe even drafted some text. In most cases, they just supervised the process/project. The "big boss" will most probably be the last, though.

For everyone in between, the contribution can be very diverse. It could be someone who did experiments, someone who helped by discussing the matter (mostly these people get an acknowledgement, not authorship) or in some cases even everybody who worked in the building.

Therefore, in an average academic career where somebody progresses from PhD student to professor, they will advance in the author list. This is because they do less practical work and more coordination and organisation. This is some kind of established system that has no written rules to it. I know of professors who demand they be the first author on every publication of their PhD students. While strange, it is not forbidden.