>>57418235Gary acted like a massive ham but he had actual reasons for it - he always was one step ahead of player in the race around the Kanto. His name was always first on Gym statues, we always meet him when he's coming back from places we are yet to visit and literally became champion before us.
He also has enough respect for player to acknowledge their strength and treat them as worthy rival, especially in late game. The entire "Gary's a jerk" came from the anime.