Leviticus 5:1, 5-6 lays down a very important rule. "“If anyone sins in that he hears a public adjuration to testify, and though he is a witness, whether he has seen or come to know the matter, yet does not speak, he shall bear his iniquity . . . when he realizes his guilt in any of these and confesses the sin he has committed, he shall bring to YHWH as his compensation for the sin that he has committed, a female from the flock, a lamb or a goat, for a sin offering. And the priest shall make atonement for him for his sin."
This text relates that anyone who is a witness to a sin or sins and refuses to testify against them when called by the officials of God's community has betrayed God, the community, and justice itself. According to this passage, they are in sin. They don't have the choice to testify or not. They don't get to make that decision for themselves because they have reasons. They either testify when called upon to do so or they will remain in their injustice/iniquity/sin. Their repentance demands that they come before the community of God so that the minister can apply the sacrifice to them so that they can be forgiven. They do not get to apply the sacrifice to themselves. They do not get to have their own personal repentance. Their repentance would be willing to testify of all of the truth and nothing but the truth about the sin and confess their sin of unwillingness to come forward earlier. Apart from this, they remain in their sin.
What is worse than this is anyone who not only refuses to testify but then testifies falsely so that the guilty are pardoned by the community but not by God. This is a sin worthy of death. It is considered one of the great abominations to God in Scripture. Those who give false testimony, who become witnesses when they are not witnesses, are damned.
This is all because God takes justice seriously. It isn't a game to play like the American court system where those who can out-argue and create the most convincing narrative of events wins. You can convince people by intimidating witnesses so that they do not testify of the truth, appeal to emotion and relationships to sway people, attack the witnesses to lessen their credibility in the minds of the jury or judge, etc. Biblical justice comes from the very nature of God and to reject it is to reject God Himself. To reject the biblical process of justice, therefore, is to reject God Himself. To play a game rather than to take it seriously is the occupation of the damned, but the redeemed will seek His face even when inconvenient, when it brings a sword between relationships, when it requires his courage and even his life.