After you've donated enough points, you will get a password. (There are three passwords you can get eventually, after donating many points.) Depending on the version Tamagotchi you have, the password is for a souvenir, or allows you to visit the king on TamaTown (in which case he gives you another password - this time for a souvenir.)
Also, if you have two Tamagotchis, and donate to the king on both, the amount of points you win in connection games goes up.