Here in the US, public high schools date to 1820, and physics instruction began in high schools. Only later was it adopted as a subject in colleges and universities. The original mode of instruction was that there was no laboratory. Students attended lectures, memorized facts from a textbook, and recited those facts from memory. Physics was seen as a practical subject, and textbooks are full of pictures of butter churns, explanations of why gasoline is hazardous, and so on. There was not as much theoretical material as we expect today, and very little math. The vector-scalar system hadn't been invented yet, and the alternative would have been quaternions, which high school students didn't know about.
An early and influential text in the US was the English translation of a French text by Ganot. The first edition of the translation was in 1863. Electricity and magnetism was in a primitive state at that time. Maxwell's equations were cutting-edge science. So if you consider the state of the art at that time, it's pretty natural that these books started with mechanics, fluids, and thermodynamics, and then at the end put in some electromagnetism. Later texts such as Millikan and Gale show a pretty similar order of topics, although Millikan puts molecular motion and molecular forces pretty early. The main difference from the modern order of topics is that there is a lot more material early on in the course that is not Newtonian mechanics. This was possible because there was almost none of the math and problem solving that today causes us to spend 10 weeks on Newton's laws. The steam engine was the latest technology, so it was natural to want to do a lot of thermodynamics early on.
Later books seem to have mostly just tacked on later developments in historical order, while also moving almost everything but Newtonian mechanics out of the first-semester course. Following the historical sequence seems reasonable, since the historical development does relate to the difficulty and abstraction of the subject. Electromagnetism is less concrete than mechanics, and relativity and quantum mechanics are even more remote from human experience.
A notable effort to make radical changes in the sequence of topics was the Sputnik-era PSSC Physics, which started with waves and only later covered mechanics. This innovation did not catch on. Another change that made limited headway was to put relativity very early, and then use relativity explicitly in the development of electromagnetism. This was done in the text by Purcell, which is still being used and is in a third edition.
Today, very few high school students take physics, so it's mainly a college class, and it's extremely difficult to change the order of topics in a freshman physics sequence, because there is an expectation that it will be standardized in order to allow students to transfer from one school to another. Community college students in a large city in the US may randomly take classes at several different community colleges before transferring to a four-year school.
References
Meltzer and Otero, A brief history of physics education in the United States, DOI: 10.1119/1.4902397
Holbrow, Archaeology of a Bookstack: Some Major Introductory Physics Texts of the
Last 150 Years, http://dx.doi.org/10.1063/1.882613
Millikan, https://archive.org/details/afirstcourseinp01galegoog/page/n12/mode/2up
Ganot-Atkinson, https://catalog.hathitrust.org/Record/101717020