I'm not talking about "collapsing the sidebars". This is too primitive.
There are cases where you want to keep the user in the same page, like a search. Instead of redirecting the user from search results to other pages to do his work, you can show/hide page sections. It helps the user's workflow.