Sure they are trained. Usually very well trained, but there are many factors involved that aren't known.
Police guarding a house is very similar to soldiers guarding thier defensive position. Being human, they are susceptible to boredom, fatigue, weather and distractions from each other. It's impossible to remain alert for long lengths of time. Add on top of that that they usually aren't allowed to shoot unless shot at, and the odds are against the police.
Most police vests are designed to stop handguns, not rifle ammo. It's a compromise between mobility, comfort and protection. The vests soldiers wear are very bulky and heavy, but they can stop a 5.56mm round.