I was wondering why Allah swt gave Pharaoh so many chances and why did Allah swt want him to believe? Is there a reason why he gave Pharaoh so many chances

Because Allah wanted a chance to test him and to show him mercy for some of the good he did. There is a hadith that says pharaoh used to feed people because he thought he was God. He kept feeding less and less, until the punishment came to him when he stopped feeding people.