They are not supposed to. DnD 5e rules are clear on that point. They can only a learn a very limited number of spells. It would be completely unbalanced otherwise.