Oyior, if your confusion is over the phrase 'write off' in these two phrases--
1.the library writes off a certain quantity of books each year. --probably means that every year the library finds a number of books missing. The library records this as a loss. Or they cancel their entries from the inventory. Or they consider them a tax deductible loss.