The temple tax was for atonement, and of course the sinless Jesus hardly needed to pay an atonement tax. However, do notice that Jesus had Peter pay the tax anyway "to not offend them" - in other words, there are more important things in the kingdom that money, and it's better to pay the tax...