Why do we ask god to inscribe us in he book of life? If whatever god does is for the best including when god removes someone from this world. We even have a custom when we hear that someone passed away we say, "Baruch Dayan ha'emet". If we believe that god does everything for the best then who are we to ask him to give us life? The same way he felt it was necessary to give us life he may feel it is necessary to take it away. Even great people and pious people receive "premature" death or even a form of seemingly kareit! If someone can bring a quote from a source of any Jewish text that could answer this question that would be awesome.
I am combining two main themes.
First, if G-d had already decided our fate, then, what would be the whole purpose of all the prayers that we do, not just on the High Holidays, but each day of the year? Furthermore, what would be the point of teshuva (repentance) at any point in the year?
In actuality, G-d prefers that we repent and not die. G-d doesn't desire the death of even the most wicked person, but would rather have him repent and turn to the ways of G-d. See Yechezkel 33:11 for a verse that emphasizes exactly this concept.
Either Art Scroll or Birnbaum siddur explains an interesting phrase that we say in each Amidah during the 10 Days of Repentance:
זכרינו לחיים... וכתבינו בספר החיים למענך א-להים חיים
Remember us for life ... and inscribe us in the book of life for your sake, living G-d.
What does "for your sake" mean? This is in line with what I stated above. G-d wants man to live because he wants to continuously bless us and do good things for us. But, that's not automatic, as the verse (and you) have implied. Wicked people who don't repent and continuously defy the commandments do deserve to be punished. How do we know, ourselves, what G-d's "limit of tolerance" is, and is it the same standard for everyone?
Thus, we repent and also ask G-d to sustain us so that we can continue to please G-d when we perform mitzvoth and follow his ways.