Well if Wikipedia says it, it must be true!
You probably will not believe the heretical Luther Works but here it is:
During the thirteenth century scholastic theologians also formulated the doctrine concerning the treasury of merits in order to explain how the pope could relax a penalty which God had demanded. This treasury was a storehouse of merits of Christ and the saints who had done more than God had required of them. The pope as the successor of Peter, to whom Christ had given the power of the keys, could draw upon ,this treasury when granting indulgences. To make sure that the pope s authority over the sinner did not end with the latter s death, Pope Sixtus IV declared in 1477 that the pope exercised authority over souls in purgatory, but only by way of intercession for them. The ordinary Christian could not readily distinguish between intercession and complete jurisdiction and therefore freely bought indulgences for the dead.
Another important change occurred when theologians discovered a distinction between contrition and attrition. Realizing that true contrition, prompted by one’s love of God, was difficult to achieve, they stated that attrition, prompted by such an unworthy motive as fear of punishment, might be substituted for contrition and then transformed into it by absolution in the sacrament of penance. The bad ethical effects of this are obvious, for a man fearing eternal punishment could in one transaction with an indulgence hawker convert his attrition into contrition and his eternal sin into a temporal sin, be freed of his guilt, and buy a plenary indulgence remitting all temporal penalty. Many uneducated people innocently confused temporal and eternal punishment and the guilt and penalties of sin, actually believing that they could buy their salvation, despite the fact that the distinctions were made in the papal bulls promulgating indulgences.
The indulgence with which Luther came into direct contact through his parishioners was the jubilee indulgence announced by Pope Julius II for the year 1510, the proceeds of which were to be used in building the new basilica of St. Peter in Rome. After the death of Julius II in 1513, Leo X revived this indulgence. In March, 1515, he commissioned Albrecht of Hohenzollern, archbishop of Mainz and of Magdeburg and bishop of Halberstadt, to sell the indulgence in his sees and in certain Brandenburg lands. Albrecht, who was heavily indebted to the papacy for the dispensation to hold the three sees and for the pallium, the symbol of his episcopal authority in Mainz, borrowed the money from the banking house of the Fuggers. In return for selling the indulgence the Fuggers and he were to get half of the proceeds while the other half was to go to the papal treasury. Albrecht appointed as subcommissary Johann Tetzel, a Dominican monk who had sold indulgences for the papacy and the Fuggers since 1504.
Although Luther did not know the details concerning the bargaining at Home among the pope, Archbishop Albrecht, and the Fuggers, he knew the provisions of the papal bull and of Albrecht’s instructions to the indulgence salesmen. The purchasers were assured that this indulgence would grant plenary remission of temporal sin and its penalties in purgatory upon absolution by a confessor of the purchaser’s own choice. An indulgence slip would be given the purchaser which would compel a priest to grant him absolution or be subject to excommunication by Tetzel. Furthermore, one could obtain plenary remission of all penalties for the dead in purgatory without confession or contrition. The official doctrines of the church were stated by Tetzel and the other indulgence sellers, but their mercenary approach gave the impression that money would remit the guilt and the penalties of the worst crimes and would immediately transfer souls suffering in purgatory to heaven.
Luther had repeatedly warned people of the danger of being misled by indulgences and of the necessity of sincere repentance.* In the Ninety-five Theses he organizes all his arguments with reference to Albrecht’s instructions and the claims of the indulgence sellers, not in his usual logical arrangement. He begins with the thesis which embodies the core of all the others, namely, that penance is not a mechanical act but a permanent inner attitude. On the same day that he posted the theses, he sent a copy to Archbishop Albrecht with an accompanying letter advising him to stop the sale of indulgences. He hoped that no copies would be circulated among the people at this time, for he did not want to involve his prince, Frederick the Wise, in difficulties, since Frederick had already spoken against the indulgence preached by Tetzel and had forbidden its sale in his lands.
Luther, Martin: Pelikan, Jaroslav Jan (Hrsg.) ; Oswald, Hilton C. (Hrsg.) ; Lehmann, Helmut T. (Hrsg.): Luther’s Works, Vol. 31 : Career of the Reformer I. Philadelphia : Fortress Press, 1999, c1957 (Luther’s Works 31), S. 31:20-22