The presence of armed authority at protests only tends to accentuate feelings of discontent, alienation and oppression on the part of protesters. If a gathering of protesters is already destroying property and the like, then it is necessary to have some force that will disperse the violence and arrest people if necessary. But a peaceful protest can turn ugly easily if there is an unneeded show of force at the beginning. It's as if violence is the expected outcome, and I think people resent not having the ability to gather without being prejudged. It is supposed to be a right to gather in public places. It isn't something that should be over controlled.
In history we have many examples of how when authority is present in a large crowd, the large crowd will fall. It's a matter of keeping the average citizens down and brain-washed. When there is weaponry involved, especially the brutal variety that many law enforcers carry, this punishment of the crowd is increased ten fold.
If anything I think the presence of police or soldiers in riot gear discourages people from acting violently knowing that there could be immediate repocussions for doing so, I think if a crowd is going to get violent its likely the final straw after peaceful protests have failed and they will get violent with police presence or not.
This question makes the mistake of assuming that a correlation is indicative of a possible cause. While it is true that police in riot gear are associated with violent protests, to ask whether it is the cause of such violence is to assume that the police are dispatched randomly to these events. If a protest is likely to turn violent, then the police are dispatched, hence the association.
When crowds are gathered at protests, it is necessary for the police to be in riot gear. This does not affect the crowd at the gathering, usually they are already worked up and ready to start rioting. The police need to be prepared for what could happen at large crowd gatherings.