This is precisely an instinctive (inferential) thing to have done. Why did man have to see a spirit in the fire or the water? Why not leave it at "it's hot" or "it's wet"?
Why does my dog bark at the wind? Why when the floor creaks does my wife immediately suspect someone is in the house? It's a product of mind and experience.
When she wakens alarmed, her rational mind usually takes over...."I should have heard the door open, we live in a safe rural community, the floor sometimes creaks when the cat walks on it"...etc. IOW she applies critical thinking and suppresses her primitive inference.
As to why fire and water and planets/sun etc. were endowed with spirits, things that move and exert force are easily thought of as animate or animated by someone animate. Combine that with the importance things like water, fire, wind, sun have to human survival, they were concerns playing on the mind all the time.
Animate vs. inanimate are innate concepts in all but the simplest of organisms. Yet the mind of my cat seems to enjoy imagining/pretending her stuffed ball of feathers on a string as a bird.
Believing and make believing are sisters. Religion makes no effort to separate them.