Universities are composed of "schools," and those school are composed of departments. Deans head schools, chairs head departments. And deans report to a provost, chairs to deans. Deans may have major external responsibilities--the university campaign, arrangements with other institutions, representing the university to various constituencies. They are in this sense contributing directly to the president's agenda. Other universities may have deans who are more internally focussed.
Department chairs are there to strengthen their departments and strengthen ties with other university departments and elsewhere. They must tend to faculty who are not performing up to their potential, mentor junior faculty, encourage grants and fellowships, and ideally they are in the business of pushing their department to much greater strength. That may involve systematic hires, focusing, and strategic plans over the next five or so years, sometimes dragging their colleagues along. Student numbers are crucial, but there is an offset if the grants are numerous and flush with overhead.
At my university, one department was propelled forward by a deliberate narrowing of focus and the hiring world-class faculty, and keeping hiring if some leave. There have been recurrent attempts to push forward another mainline department, but they have not had the kind of success they would have liked. I know of one department that was well known to be weak, and the dean hired a chair who exhibited the capacity to make big changes (as that person had done elsewhere). (I don't know if that proved successful.} When a department or school is internally problematic, and perhaps an externally hired dean did not work out, and so the Provost and President may appoint a dean or professor from elsewhere in the university to get the unit in shape.
Ideally a dean does not get many problems from the chairs and surely not from the faculty. Chairs should solve faculty problems, and a dean should only hear from chairs when the dean can make a distinct difference. Every school has problematic units and, hopefully, stellar units. One department might be moved or combined with another because they were quite expensive in terms of students taught and weak external grant-getting. New schools may be formed by combining schools if those schools and their departments were small and riven with turmoil--especially if external constituencies suggest that the combined units would present a more unified and stronger image. You never want to go to the Provost to complain--rather you want to go to the administration building with a plan to bring in a slew of scholars who bring enormous prestige and lots of externally funded research.
These are the facts of many universities' bureaucratic life. (Smaller universities with stellar faculty may well be managed more intimately, but this is comparatively rare.) By the way, ideally you will have a department chair who works with the faculty to propose a plan of action that is doable and will have a transformative effect on the department. (Transformative here is not ala Rumsfeld at Defense, but rather in terms of quality, reputation, and budget. Better a dean be presented with a surfeit of realistic opportunities than with defenses of boundaries and current quality. It is a dean's job to find the resources for departmental plans that are undeniably terrific. Of course, the dean recruits chairs to help him lasso those resources, and the provost and president and institutional advancement will help, but in the end, the dean (and the senior administrators if needed) are the resource resourcers. Ideally, you have a faculty that bring in prestige and resources just by their doing their work, and then the dean and President can find even further resources.
I believe that the reputation of a department is in the end a function of the reputations of its faculty, its concentrations in particular areas, placement of doctoral students,, etc. I know nothing about the reputations of schools and universities.