Sheriffs are ELECTED by the people. As such, they are a direct representative for, and guardian of, the wishes of the PEOPLE.
City police chiefs and state police directors are APPOINTED by their respective governments. They answer to the government and NOT the people in their citys or states. If they don't adhere to the government's wishes they will be fired - so they have no real interest in risking their job just to stand up for the citizens!