OR to people who have been proven wrong and want to deflect the conversation to a personal attack on the one who proved them wrong, which is also often the case with arguments like in the OP 🤷
That's when the shrug is most important to indicate that you don't mean it as harshly as it might otherwise be interpreted. Of course, a somewhat sarcastic shrug can work well with the ones who ARE deserving of some snark, so mileage may vary 😁