It's very field dependent. The first author=person who did most of the work and last author=advisor is pretty much just how biomedical science works. Other fields have different traditions. I'm a computational biologist who has worked in both biology and computer science, and in CS (at least in the 1990s-early 2000s) the tradition was simple alphabetical order, for example, with no privilege afforded to either the first or last place. Along with other quirks like how presenting a result at a conference was considered equal to publishing it as opposed to in biology where conferences are more social networking events.