Ref. No. 798 Alif
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follows:
The Ilm (knowledge) which deals with the worldly matters and requirements is called Dunyavi Ilm. And the Ilm which guides in the matters of the Hereafter is Deeni Ilm. Also worldly knowledge is required to solve worldly problems and fulfill worldly needs. So, there is nothing wrong in such a division of Ilm into two types. However both types of knowledge are of great importance.
And Allah knows best
Darul Uloom Waqf Deoband