First of all, he said all living things have souls because a soul is the principle of life. By definition, it is the thing that is the difference between something that is alive and something that is not. Although we know a lot about the mechanisms of life today and how that breaks down as something dies, I think it's safe to say we still don't know exactly what makes a thing alive, and we certainly don't know how to create or restore life. If nothing else, soul is a useful label for that principle.
According to Aristotle and Aquinas, what makes humans different from other animals is not the existence of a soul, and neither is it consciousness or emotions. What makes us different is that we have a rational soul, which means we are capable of recognizing universals and dealing with abstractions, which is connected with our use of language that can express and communicate these concepts.
I recommend biologist and theologian Rev. Nicanor Austriaco, O.P. [1] for an explanation of how this developed and how the biblical idea of Adam fits in with modern evolution. I also recommend philosopher Dr. Michael Augros [2] for a very rich explanation of how we can understand that we have a rational soul, and what are its characteristics. Both of these men draw heavily on Aquinas, but they bring his ideas into modern biology and philosophical discussion.
1: https://www.youtube.com/watch?v=3MsJ67qtHYY 2: https://www.amazon.com/dp/B0746R3TXN/