According to the Holy Spirit's infallible inspiration of scripture, is anything ever recorded that is unnecessary or curious? I wonder sometimes where the role of Bible trivia and extensive historical research plays into the Bible.  For example, Melchisedec, is a type of Christ in a great part because the Bible does not provide any genealogical record of him, he just appears as though he never had a beginning. If somebody found some ancient monument that recorded an oral history of Melchisedec's parents, to best grasp the meaning in the Bible one would have to try and not think about that discovery.  It would be very curious and unnecessary information.

I am not questioning if Q &amp; A about various things does not have some theoretical value, as it eventually pertains to life and death.  However, as far as scriptures themselves are concerned, is the Bible ever interested in the curious for the sake of general interest, or the unnecessary to life and death?
Nothing is unnecessary within scripture: everything mentioned in scripture is essential and not merely curious, because all scripture is useful for teaching, refutation, correction, and training in righteousness:


  2 Timothy 3:16-17
  16 All scripture is inspired by God and is useful for teaching, for refutation, for correction, and for training in righteousness, 17
  so that one who belongs to God may be competent, equipped for every good work.


Regarding study, and we may presume especially study of the trivial, take care to not exhaust yourself:


  Ecclesiastes 12:9-14
  Epilogue. 9
  Besides being wise, Qoheleth taught the people knowledge, and weighed, scrutinized and arranged many proverbs.
  10
  Qoheleth sought to find appropriate sayings, and to write down true sayings with precision.
  11
  The sayings of the wise are like goads; like fixed spikes are the collected sayings given by one shepherd.
  12
  As to more than these, my son, beware. Of the making of many books there is no end, and in much study there is weariness for the flesh.
  13
  The last word, when all is heard: Fear God and keep his commandments, for this concerns all humankind;
  14
  because God will bring to judgment every work, with all its hidden qualities, whether good or bad.


(An aside: Christ does have a very important genealogical history through His Blessed Mother, Mary.)