The book of Job was placed in the Old Testament after the book of Ester and before the book of Psalms. I say placed because the book of Job was actually the first book of the Bible ever written. Job was written somewhere between 2100 BC and 2600 BC. Moses wrote the Pentateuch, the first five books of the Bible, around 1400 BC so the book of Job is at least 700 years older than the Law of Moses and could be 1200 years older.
The question is what is so important about Job that God had to add it as part of His Word when the timeline is so out of sequence with the other books of the Old Testament? I think the story of Job reminds us God is sovereign, He is righteous, and He is just. That means God is sufficient for our needs and trustworthy in every situation to do the right thing for us. God tells us we will suffer here on earth and although we may not understand why we should still trust in God and bear up under our affliction while continuing to worship and praise God in all circumstances.
We note in Job some things that are important. Satan travels to the ends of the earth doing evil. Satan still has access to the throne room of God where he accuses us before God. We see that God limits the power of Satan to harm the saints and puts a protective hedge around His own. The protective hedge mentioned in Job is an indirect reference to guardian angels dispatched by God to protect those who love Him. God’s comfort and strength are always available to those who will surrender everything to Him in faith.