I think we've seen ample evidence that emergency force fields, while great in theory, are rarely sufficient on their own to stop security problems on board starships.
On the other hand, adversaries capable of defeating forcefields are typically also capable of defeating live security people with at least equal ease.
Live personnel are mainly an asset in the intelligence gathering aspect of security work. In a flat-out fight, forcefields and live troopers are equally vulnerable. But if the task is one of tracking a suspect, there are a number of ways the suspect can thwart dumb machinery or render intelligent machinery dumb, including "nonviolent" ones, ones even a mild-mannered opponent might resort to (because even gentle crooks seldom think that brutally murdering a computer would be a bad thing, but they will stop short of slaying live eyewitnesses). So, sending a pair of redshirts to chase after a criminal may well be smarter than tracking the criminal on cameras or other, more futuristic sensors.
Also, using live security personnel may have a calming effect similar to using fierce dogs or frighteningly large horses: even hardened villains find the animals both cute and intimidating at the same time, and will yield more easily than in the face of water cannon and armored vehicles.