Police departments as such only developed in the mid-1800s and afterward, as cities outgrew the ability of part time constables and sheriff's officers. Before that, sheriffs and constables handled civil order and apprehension of criminals. The office of sheriff dates back to medieval England. The primary role of police remains not prevention, but apprehension and civil order, then as now. The number of police does not necessarily correlate with public safety, as cities with high crime rates often have large police forces. Ultimately, the individual, rather than the police, is responsible for his own security.
The problems with police forces stem largely from situations beyond their control, such as state and local governments becoming increasingly intrusive with their laws and regulations and the general declining standards of morality and civility, which affect both the population overall and the men and women who serve as LEOs.