In what cases would you justify adding the ability to Expand All/Collapse all to pages where there are individually collapsed sections?
Collapsing - When there's a lot of options within those tree nodes and the user might want to collapse the tree into a manageable list before navigating again (unless the user really likes a lot of scrolling).
Expanding - This is useful when the user doesn't know exactly where a sub-node is and would rather search for it. (this assumes your web-page or application allows for some kind of search on the treeview list).
It is always justified to provide the expand all / collapse all options while dealing with information distributed among various sections.
Every web designer must keep in mind that not all users are same. Some would prefer to have all sections expanded, taking in all the information in one go. While others may prefer opening one section at a time.
There is virtually no difficulty in providing the Expand/Collapse All buttons. But it often improves the browsing experience considerably.
There is an argument for page load times here too. I've recently done some work on testing the impact of expandable/collapsible assets on various webpages.
It works a treat on smaller screen resolutions e.g. mobile as you can provide the user the option of seeing the expanded information then once they are done they can collapse to save displaying a needlessly long web page on their device.
During testing we found simply proving an option of expanding/collapsing increased interaction and decreased load times as the content only loads once the user decides to view it.
As per my encounter with the Collapsing and Expanding following would be the cases :
In case if you are selecting options from multiple section and the number of option with in the section is high. It will be ease for user to use the feature.
To show high level summary and its details one at a time.
If the screen offering multiple option and user will select the interested one and upon click/tap it will show desired options/details/menus etc.
One way to justify this interaction is if you have an unlimited number of items that can be included in the parent element and/or if users have a sequential workflow where they need to see all to accomplish a task, but don't need that context later, so they are enabled to get rid of visual noise to allow them to focus on the next task.