It's a principle of justice that was arrived at through a lot of thought and experience. It of course takes into account that the guilty people that slip away due to this principle will cause harm of their own.
But a justice system without this principle, one that does not place a high bar for what makes one guilty, one that isn't very careful about labeling innocents guilty, will cause far more suffering. It makes systematic abuses of power more likely, and affects far more innocents ultimately. This only becomes more and more true as the power and reach of the state gets higher and higher compared to that of an individual who might be a potential criminal.