Great point. This was one of my favorite aspects of it actually.
I started as a rogue and would gradually "harvest" some sort of arcane trophy from various monsters we defeated or quests we went on. I gradually cobbled together a spellbook as I grew my rogue, including some hacked together spells that had some wild magic type surprises at first as I was learning. These were the most fun levels by far.