You don't have to buy the piggy bank, even after it's filled, but this does allow you to get coins at a great price! Additionally, the piggy bank does not use coins that you've earned or gotten as a reward for playing to be filled, so you're not purchasing coins that you've already earned.

If you don't choose to buy the piggy bank, there is a time frame within which the coins that have been collected in it will expire. This time can be seen by tapping the "events" button on the left side of the map screen, which will show you the coin count in the piggy bank and the time left to purchase before these coins expire.

If this happens, don't worry! You'll have the opportunity to fill the piggy bank again if you'd like to purchase it.