There is a utility in having some national pride, in the same way as there is in having some pride in your place of residence. If you feel some pride for your home, you are more likely to invest time and resources in caring for and improving it. If you don't care about your home you are unlikely to put any effort into taking care of it.
Nothing is quite as long-term damaging to a nation as convincing its own people to think poorly of it.
Personally I think a fair amount of the damage that the US is doing to itself now is a result of foreign influence campaigns repeatedly targeting the US's worst international blunders. These criticisms are valid and true, but they are not the entire truth and the selective lense is intentional.
A common response to self-loathing is a defensive, reactionary display of narcissism.