Why is the book of Ruth in the Bible?
The Book of Ruth ends in a pedigree: Ruth and Boaz had their son Obed, who fathered Jesse, who fathered king David.
There you go: The cutest story that leads to birth of the greatest king. What more could one be asking for? Does your family have cute love stories of ancestors?
Where is it positioned in the Bible?
That depends. In the Hebrew Bible Ruth is one of the Five Megillot, fairly young liturgical pieces, that are only part of the Ketuvim.
Much later, when the Christian Canon was formed, the very first verse was taken literally: “Long ago, in the days before Israel had a king, there was a famine in the land.” And that is how Ruth ended up between Judges and Samuel in the Greek Septuagint.