When you look at those scriptures in context it is obvious John is telling the Pharisees to "show fruits of their repentance" by being baptized saying they sin and need a Savior..
as they were trusting in their own righteousness and righteous deeds...this is the works-based salvation way of living.
If we preach the grace of Christ to people..that grace will "teach" them to live godly in this present world.
This has to do with people coming to Christ as they need a Savior..it's interesting that right after this..Jesus comes to be baptized to identify with sinners.
Matthew 3:7-12 (NASB)
[SUP]
7 [/SUP] But when he saw many of the Pharisees and Sadducees coming for baptism, he said to them, "You brood of vipers, who warned you to flee from the wrath to come?
[SUP]
8 [/SUP] "Therefore bear fruit in keeping with repentance;
[SUP]
9 [/SUP] and do not suppose that you can say to yourselves, 'We have Abraham for our father'; for I say to you that from these stones God is able to raise up children to Abraham.
[SUP]
10 [/SUP] "The axe is already laid at the root of the trees; therefore every tree that does not bear good fruit is cut down and thrown into the fire.
[SUP]
11 [/SUP] "As for me, I baptize you with water for repentance, but He who is coming after me is mightier than I, and I am not fit to remove His sandals; He will baptize you with the Holy Spirit and fire.
[SUP]
12 [/SUP] "His winnowing fork is in His hand, and He will thoroughly clear His threshing floor; and He will gather His wheat into the barn, but He will burn up the chaff with unquenchable fire."
Matthew 3:13 (NASB)
[SUP]
13 [/SUP] Then Jesus *arrived from Galilee at the Jordan
coming to John, to be baptized by him.
It's not works-based. It's just recognizing the clear witness of scripture that a faith that doesn't produce good fruit is dead.
Therefore produce fruit worthy of repentence! Matthew 3:8
Already now the ax is positioned at the root of the trees; therefore every tree not producing good fruit is cut down and thrown into the fire. Matthew 3:10