I recall reading Treasure Island and the bit about the page from the Bible. In the time in which that novel was set, paper was not something that was readily available. It's not like there was a drive-thru window at Office Depot for pirate ships. Bibles were about the only paper that was readily available, and to an illiterate, the Bible was sacred. Just as the Koran is seen as sacred to some Muslims, probably more to illiterate ones than others.
The goal of the madrasa is to help students memorize the Koran. This is quite a chore if one speaks Arabic, far more if one speaks an unrelated language like Persian, Pashto or Dari. Those who manage to memorize the entire Koran are given the title "Hafez".
The Koran is somewhat easier to memorize because so much of it is seriously repetitious. (In the name of Allah, the beneficent, the merciful) begins all but one of the 114 suras of the Koran.
Whether it is a sacrilege to write in the Koran or not is debatable. It is a sacrilege to add or remove verses from it, but so long as the writing in the margins is not an attempt to change the actual text, that is not regarded by every Muslim as sacreligious. Many Korans have the original on one side of the page and a gloss in a local language (Dari, Pashto, Berber, Persian, etc.) on the facing page.
In any event, it was stupid to dispose of these Korans by publicly burning them, and an apology was clearly the right thing to do.