He bought an indulgence.
Did you know that you can still buy indulgences today? It's only the currency that has changed. Today you trade your labor for it, instead of coin.
no one is defending selling of indulgences, that was just the hook luther hung his sinful hat on when he formed his own “church”