Goliath thought himself untouchable until he met David. When David killed him, he set off reincanations for him to atone for his sins..
Goliath's brother Guzali begged him not to do battle against Israel and instead work towards repenting. He did not listen and when he was killed, he was given a chance through reincanation to do so. Still he continued with his wicked ways until he saw his chance of going to heaven being about to be forfeited.