I know of no legal system that doesn't fail in some way. Some are much worse than others, but all have flaws. Often correcting the flaws is worse than living with them.
Don't take the above as we should just accept the flaws. We should not. However what to do about them is a hard problem and we should not do something that makes things worse.