But for skill based like sports or poker, the case would be depending on how confident I am.
I typically do an all in if I think that I am confident as well. But it's also a good strategy when you can scare the other hands in the table if you do that earlier. It's giving them an idea that you've got a good hand at that round so, it makes sense to do such when your having some pairs or high cards at that moment. Someone who's going to do that probably won't get a huge pot because others who will also going to do an all in at that moment is also a risk taker just as you. I have encountered with those kind of poker players before and it's a make it or break it moment.
Of course, there are exceptions to this rule when you are playing poker and you have a Royal Flush in your hands.
Also the other notable strong combinations, full house, etc...