Some Russian nuclear codes had been imprinted to match the kid's DNA. As the codes codes would take a little while to reset, the kid would be in danger for at least a few days. By Batman fooling the government agent, everyone would think it was the wrong baby.
It's a very touching ending. It showed that even if Bruce became Batman because of his rage and pain, he kept being Batman because he's a good person.