Why are there two ways of saying “there are” in Japanese?

I’m not asking this as a linguistic question as almost everything exists in one language or another (although if there is a linguistic or historical reason I’d love to know) but more as a philosophical one:

If the animistic Shinto tradition of rocks and trees etc being gods and having souls is so important in Japan, how can they divide things into animate and inanimate when deciding on whether to use iru or aru?