Linear algebra originally developed because of applications to differential equations and mechanics. Usually a system of differential equations can be approximated with a linear system, and a linear system requires linear algebra to solve it. I mean the period 18-19 centuries, and mathematicians like Lagrange, Cauchy, Jacobi. Later in 19th century it found many more applications, and gradually was formalized by Cayley, Sylvester, and others; formal multiplication of matrices was introduced etc. Still this knowledge was restricted to some narrow circles of pure mathematicians.
When Heisenberg invented modern quantum mechanics in 1925, he has never heard of matrices and their multiplication and had to invent these things himself.
(These things were not a part of a normal university curriculum).
After the invention of quantum mechanics, the knowledge of linear algebra spread enormously, and nowadays it is taught as a core undergraduate subject, as important as calculus. An important role played applications such as linear programming invented shortly after WWII, and fast Fourier transform.
It was understood that basic computationl algorithms of applied mathematics are
based on linear algebra.
I omitted here the "pre-history" of linear algebra before 18th century. Mainly because I do not have sufficient knowledge of early applications. But people were solving linear systems since the antiquity, and studied determinants since 17th century at least. I am not sure what the main motivation was then.
One thing however seems clear: linear algebra was NOT invented for the needs of