They want to appear generous and honest so that they can gain the family's trust. It seems that the King assumes that he and the Duke will steal the money back later, but when I read this section I assumed the idea was to find a way to manipulate the family into giving the money back to them, which is what eventually happens.
I agree with those who say that a con artist will first try to ensnare victims by winning their trust. Huck knows that they are con artists, but he feels helpless. He tries to think of a way to help without directly interfering with the king and the duke.
You must remember that the King and the Duke are con men! Every move they make serves only to further their OWN intersts. They are not really giving it to the girls; they just want it to LOOK like they are. Remember what is happening around the King and the Duke when they decided to give the money away. The town Doctor is questioning their identity and is trying to sway the townspeople to turn against them. At this critical moment where their cover may blown, the two con men decided to "give" them money to the girls to show everyone how "real" they are. The doctor is not fooled;however, the rest of the townspeople again begin to support the King and the Duke--their ruse can continue!
The first thing a good con artist does is to snag the trust of those he/she wishes to con. This is a ruse to do just that.
They want to appear gracious, selfless, and wonderfully supportive, in order to clamp down on any suspicions about their identity. Besides, they aren't really handing the money over to the girls physically; they are still hiding the gold, and they can just say they are going to give it to them. That sounds awfully nice, and no harm is done, right? It helps to win the trust of the family and locals, and weighs in their favor when they decide to auction the house and property. So, "giving" the money to the girls is just a cajoling tactic, a sweet gift to lure the family into trusting them, and to aid in further and more insidious plans.
The first thing con men need to make a scam worthwhile is trust, trust in that they will do the right thing. The con men know this and realize that it is still possible to get the money back when they dissolve the estate for its proceeds.