When churches preach against selfishness, they assume that a Christian will be ashamed and then do selfless things.
That is the theory.
But there is a fatal flaw in this thinking.
The Christian cannot overcome his “self”. Only the Lord is able to accomplish this.
Only by yielding ourselves to His working within us are we able to do anything that is good. And keep from doing anything that is bad.