Why would Shakespeare have Prospero make such a speech? Why drown books, the very thing that gave him power? Perhaps because Prospero's use of magic became too much, too powerful, and had to be checked.
During Shakespeare's time, many people had access to books because of the printing press. Shakespeare himself benefited from such changes, which allowed him to study great classics. But with this shift to more people being able to read, the potential for power increased, because information is power. This is where Prospero received his power, but he sent his power perhaps too far, as he enslaved others. He could have taken this all further, but settled with restoring his dukedom.
Prospero's part does encourage increasing knowledge, but also checking it to not take that knowledge too far.