David knows truth and good advice regardless of the source. It is easy to ignore someone when we do not like them or we do not like what they are saying. Sometimes we even ridicule and mock people who tell us things we do not like. We especially hate it when the advice is from one of the people who has repeatedly opposed us. If we are ever going to accomplish great things for God, we need to get past that.
Truth is truth regardless of the source.
David could acknowledge that and swallow his pride. Because of that, he was able to encourage and support the people of Israel. That does not mean that all advice is good and that enemies are always right. Sometimes those who oppose us are just plain wrong. Sometimes their advice is self centered and peevish.