Because papers are often referred to by the first author’s name, and often the first author is the primary researcher and therefore deserves the extra credit. When two or more primary authors are equally involved, they’ll often do a random ordering but annotate this so that no one thinks one did more than the others.
some journals and colleges actually have a policy to always use random order to help fight the "senior researcher gets all the credit" culture in academia.
theres a lot of cases where a prof forced their students to put them first even if they had an advisor role, or even credit someone for zero real work because they threatened to block submission and prevent the students from getting their degree.