“Purgatory is the place where the soul is cleansed of all impurities, as Dante described in his great poem The Divine Comedy. Today purgatory can refer to any place or situation in which suffering and misery are felt to be sharp but temporary. Waiting to hear the results of a test, or whether you got a good job, can be a purgatory. And an endless after-dinner speech can make an entire roomful of people feel as if they’re in purgatory.” (Source)
It’s temporary torture, but a necessary “evil” to purge one’s soul of sin. And you’re right. It’s your choice to sin, but doing so prevents you from entering Heaven.