Yeah yeah I know, ACAB and everything.
Police don't just show up, they walk around. At least in non-police states like the US.
And wherever they walk around, crime is prevented. Because a robber isn't going to snatch a purse when a police is looking right at them. A drug dealer isn't going to sell drugs in front of the police station. And people drive slower and don't go into a road rage when the police is riding close by.
So no, police does prevent crimes.