Uhh, this essentially is about reducing clicks. Reopening the buy window 10 times to buy 10 spells takes clicks. No one is expecting the window to close, and nothing about the buy button shouts "use me instead I won't close the window".
I do think it's likely a small bug in a game full of them. We got horses in dungeons, breaking and entering gets you executed, buying a spell you already have just adds it to your book again, quest women referred to as men. The programmers forgot to handle a lot of edge cases.