Sin grows and for this reason confession, repentance and altering behavior with a new mindset are essential to any walk with God and others. Some people think that some sins are smaller or less important than others, but this is not true because the sin lies within the mind and heart of people which is then reflected in their actions. This is why you see criminals who start out with petty thefts, who then become chronic liars, who then disregard the feelings of others, to ultimately becoming totally unresponsive or uncaring of any social concerns, morals, laws and public outcry. Like yeast which leavens the bread, sin spreads within the soul. If it continues unchecked a person could eventually lose sight of even themselves. When this happens, the person ends up having to give control of their intellect, emotions and maybe even physicality to others to manage, like those in jail.
Most folks do not set out to lie, steal and harm others, but some sick seed is planted within the mind that "everyone's a hypocrite," or "life owes me" or "my anger is justified," or worse "God doesn't hear my prayers," when really nothing could be further from the truth. Sin or wrongdoing, illegal actions, immorality and base behavior come from a sickness of the soul and the sooner one admits to it by confessing the matter to those who can be trusted with the truth and know how to handle accountability responsibly, the sooner that person can move on to restoration and repair work.
The Bible tells us that confession is good for the soul because it is a way of admitting to ourselves and to others what it is that went terribly wrong. Sometimes we are harder on ourselves than anyone else would be and we end up closing up like clams over the small stuff only to aggravate the situation into the bigger issues. Remember too that all people sin and fall short of the glory of God. No one is perfect. Some churches mandate confession and oddly by making the process difficult, embarrassing and self-governing, once you have had to admit your faults publically to another helps because it makes you avoid committing any future sins since you don't want to have to go through that penetant process again. The upside is that you know that there is the possibility for forgiveness (always and for anything) under God, which helps cause a release of all that pent up self-doubt and "beating oneself up" over things which really need to be dealt with immediately and dispelled to their proper place in life. Once confession has taken place, you can move on to restitution, making things right and fixing real problems which probably have their root in family dynamics or the social environment.
One should never confess to any sin they did not commit. Even if falsely accused, know that God can and will make things right. Remember too that this goes both ways. Even if you do not confess, the truth will out eventually since God is a God of truth and justice. The reason for not admitting to something one did not do is because it would obstruct true justice and in essence would be a lie. Remember also that people are going to believe what they want to believe no matter what you say and do. Confession is for the benefit of the sinner, not for those who will be administering justice and punishment. You need to confess your sins for your own sake to make things right within your own mind and with God. Apologize to those who you know you have harmed and restore to wholeness when possible those whom you have hurt. The only exception here would be if the confession would cause more harm than good in the long run, for example, telling one's spouse about an infidelity which occurred years ago. That kind of confession should go to your preacher, lawyer or psychological counselor all of whom under the law must respect confidentiality. Rest assured, God already knows and why God says in the Bible in the Book of Revelation "I stand at the door and knock."