We need to fire some actions before a sidebar is displayed or after a sidebar is displayed.
It is important for:
1. Filtering HTML generated by all the widgets in a sidebar.
2. Outputting custom HTML in the beginning and the end of a sidebar.
3. Detecting if a specific piece of HTML was generated by a sidebar or not.
dynamic_sidebar() In the file wp-includes/widgets.php should have these lines:
In the beginning of the function
and in the end of the function
It would really help developers add functionalities to the sidebars.