Most sites will have a few categories, which can be all displayed in the facets widget without scrolling down.
But some e-commerce sores can manage hundreds of thousands of products, and thousands of product categories. A customer would have to scroll down many pages just to be able to filter a search with a category.
Compare the same facet hierarchy below, flat and collapsed:
Collapsing option in admin
Go to your extension “Theme”, activate it, and select the option as described below: