The people asked God for the law/religion but they couldn't keep it but God gave them to show all that no one can keep it but all need a Saviour that's why Jesus came to die as the ultimate sacrifice. Animals that were spotless were accepted as temporary sacrifice to wash away sins which was transferred to the animal, until the Ultimate sacrifice.
God created the world, he can do anything and everything and he created it all and knows what everything was created for and what everything does.
Thus if he commanded you to sacrifice animals, there is no question of necessity, he commanded it, weather it might be needed or not. The very fact that he commanded it means it has a necessity which can defy even logic because there is no need for a command by God to be heeded.
The bible is written by HUMANS. It is then sorted by HUMANS. The only thing that God is supposed to have written himself is the Ten Commandments. Those, even now, are morally good. It's the other junk, the stuff written by humans, that makes us seem so stupid to believe in it. Why on earth is it fine to just needlessly slaughter innocents?