To understand why Makar confesses to Aksionov and then to the authorities, it is necessary to know some of the story's background and what leads up to the confession. It is also important to realize that the author, Leo Tolstoy, had a spiritual awakening around the time this story was written and became a devout Christian.
The short story "God Sees the Truth, But Waits" by Leo Tolstoy tells of Ivan Dmitrich Aksionov, a merchant who is unjustly accused of murder and robbery. For his supposed crime he is beaten and then sent off to hard labor in Siberia. He never sees his wife and children again. In his despair, Aksionov turns to God and prayer.
For 26 years Aksionov endures his captivity. He reads holy books, prays, sings, and is renowned for his meekness. The prisoner Makar arrives with some other new convicts, and some remarks that he makes convinces Aksionov that Makar actually committed the murder that caused him to be sent to prison. At first Makar threatens Aksionov, but when Aksionov does not turn Makar in for digging an escape tunnel, Makar confesses to Aksionov that he was the one who killed the merchant and that he had intended to kill Aksionov, too.
Makar confesses to the crime first to Aksionov and then to the authorities because he is touched by Aksionov's sincerity and piety. The only way Aksionov has managed to endure his many years in the labor camp is by developing closeness to God. The purity of Aksionov's character breaks through Makar's initial bluster and lies and causes him to long for the honesty and proximity to God that Aksionov has. Only in this way can he hope for forgiveness not only from Aksionov, but ultimately from God.