Without wanting to sound argumentative for the sake of it; what makes it better and what other methods would you have been thinking of as a reference?
One purpose is to allow you get a new skill that you are able to use because you have level'd up. This could much more easily be achieved by keeping it all within the character management sheet. Just allow people to select abilities in what ever class they unlock. Simple.
What purpose do the books serve?
The way I see it:
1. Skills can be replaced, which makes selecting skills at level-up impractical.
2. Skill numbers are limited by their respective ability, meaning you'd have to hold off on filling your available skills if you're waiting for a higher level skill that you can't use yet. This would require foresight and planning that new players wouldn't have available to them.
Now both those things can be worked around in a different system, but I think they're examples of how a skill book system is simpler and more intuitive.
Another purpose is as a crafting objective. There are scrolls etc to craft.
Another is as a Gold sink. Balancing player income need not come at the expense of infuriatingly annoying game mechanics.
To be fair, skillbooks are probably the only worthwhile expense in the entire game. Vendors rarely sell anything else of value.
It adds another challenge for you to overcome. That's true. One man's annoyance is another man's challenge. But one could argue that for most any poorly designed game mechanic.
The only thing about it that's "challenging" is that merchant selection is random, which is a feature I've been pretty vocal against whenever it comes up. Otherwise it just constitutes a monetary investment that you can easily and consistently afford only a few hours after starting the game.