These questions may be answered when placed in a historical context becky.
This passage is found only in Matthew with a similar but slightly different version found in Luke. Since it is not found in Mark, from which both Matthew and Luke are based, it is quite safe to assume that the passages are additions to the gospel by the author, possibly from another manuscript but more likely as a teaching to the Christians of the time.
You see at the time, late first century to early second, martyrdom was popular - people believed that by dying in persecution and so emulating Christ they would automatically gain entry to Heaven. This of course involved their confessing as a Christian at trial, denying Christ at trial often led to the individuals freedom.
Thus the gospel authors, probably proponants of martyrdom themselves, encouraged people to "confess Christ" at trial with the bribe that Christ would put in a good word for them with his Father. It also helped weadle out the Gnostic heretics (which is how i know all this stuff) from the orthodox flock, because Gnostics would deny being Christian at trial - themselves seeing martyrdom in this way as a form of suicide.