I see this advice a lot in various forms. I think people are probably too conflict averse on average so there is some merit to it but there are limits. I feel like there are a lot of times in my life where just moving on or being diplomatic has been the right call.
The manager example is a good case study. There are a lot of examples here where there might be genuine repercussions for raising an issue with a manager. I wouldn't give this as blanket advice.
Unfortunately, I don't think there's a simple rule about whether or not you should raise an issue and it needs to be decided case by case.