From this documentation Factories are special objects that have only one purpose: to create an instance of one non-injectable class or interface
non-injectable object are Objects that cannot be instantiated by the object manager.
this \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory
is a factory class that really exist in vendor/magento/catalog directory
why we should use this function instead of inject directly \Magento\Catalog\Model\ResourceModel\Category\Collection
in constructor , and why \Magento\Catalog\Model\ResourceModel\Category\Collection
is a none-injectable class because from this link it is not instance of entity to provide or a model representing a database entity it is a collection of models
and another question is
why \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory
already exist in vendor directory because from the documentation factories are an automatically generated class type. Factory classes do not need to be explicitly defined