Assuming you mean this scene at the end where they are all struggling over the Infinity Gauntlet and to not let Thanos grab it:
Well quite easily because Thanos actually grabs his neck and pulled him backwards. Thor did the sensible thing and turn to face and fight his opponent instead of taking a hit in the back.
There is no official source to answer this question, so I will do my best to answer it with canon from the movies:
We know of roughly 4 occasions when Ant-Man becomes (Gi)Ant-Man:
In a lab. We don't see this instance on screen, but Scott says that he passed out.
In Civil War. We do see this one, but he isn't big for very long before Iron ...