@bluedolphin-- Have you heard of the Jessica Lal murder case in India? That case resulted in newspaper headlines that read "No One Killed Jessica" because over 100 eye witnesses gave false testimony to law enforcement about her murder. It was only after a huge social movement that the court decided to review the case and look into the false testimonies and evidence.
Unfortunately, false testimony is a reality and it does cause criminals to go free sometimes. I think that in countries where there is an independent judicial system with transparency, these types of issues are less likely. But it happens everywhere to some extent.