At least for LaTeX there's also a ton of "cargo cult" involved. You either build a template, or get one from a professor, when you start as a student, and you just use that template for the rest of your time at the university. It's not uncommon to see a template that was initially created in the 90's and people just sort of added to it over the years.