Jesus pitched the Sermon on the Mount against those who condemned murder and avoided adultery as sin, not against those who murdered and followed every lust . . . against those who loved the friend, not against the selfish who loved merely themselves; against those who were ready benefactors and fasted and prayed, not against those who neglected to do so. . . . Jesus did not call the pious to repentance simply because he rejected their sin, but also because he condemned their righteousness. (The History of the Christ, 149-50)
Jesus was not preaching to the perilously immoral but the perilously moral. Not to those outside the church but inside. All through the Sermon, Jesus contrasts two kinds of people, but in each case it is not the disobedient and the obedient, but two kinds of obedience--true fasting and false fasting, true prayer and false prayer (not fasting vs. gluttony or prayer vs. prayerlessness). It is disobedient obedience and obedient obedience.