There was a time when the leaders in the Church believed this to be true. Due to the belief most people waited until the very end of life to confess. As you can imagine, this may have left many in jeopardy in regard to salvation.
While still a Catholic, Tertullian wrote (A.D. 200-6) his “De poenitentia” in which he distinguishes two kinds of penance, one as a preparation for baptism, the other to obtain forgiveness of certain grievous sins committed after baptism, i.e., apostasy, murder, and adultery. For these, however, he allows only one forgiveness: "Foreseeing these poisons of the Evil One, God, although the gate of forgiveness has been shut and fastened up with the bar of baptism, has permitted it still to stand somewhat open. In the vestibule He has stationed a second repentance for opening to such as knock; but now once for all, because now for the second time; but never more, because the last time it had been in vain.
In the days of Hermas there was evidently a school of rigorists who insisted that there was no pardon for sin committed after baptism (Similitude VIII.6).
…Fourth Lateran Council (1215). At that time, according to Lea (op. cit., I, 228), the necessity of confession “became a new article of faith” and the canon, omnis utriusque sexus, “is perhaps the most important legislative act in the history of the Church” (ibid., 230). But, as the Council of Trent affirms, “the Church did not through the Lateran Council prescribe that the faithful of Christ should confess — a thing which it knew to be by Divine right necessary and established — but that the precept of confessing at least once a year should be complied with by all and every one when they reached the age of discretion”(Sess., XIV, c. 5). The Lateran edict presupposed the necessity of confession as an article of Catholic belief and laid down a law as to the minimum frequency of confession — at least once a year.
As you can see, the practice evolved over the history of the Church.