Explain how the functions of management, including planning, organizing, staffing, leading, and controlling, affect the work environment.