Firstly, that chat doesn't measure popularity, it measures "how justified were they".
Also, I think that a honest reading of that chart would be that there is the Vietnam War (with very low justification), WW2 (with high justification) and then two subgroups: WW1 & Civil War with moderate justification, and Korea, Gulf War 1 and Afghanistan with lower levels, but still significant levels of justification.
Popularity of conflicts du jour and opinion of the military as a valuable enterprise in general are different.
For instance, I joined and served in the military during the second Iraq war despite disapproving of the invasion.
This holds especially for career civil servants, as political winds shift and one may not always agree with the policies of the current government.
One does not serve because the nation is perfect, one serves to strengthen the nation and to have the opportunity to make it better for future generations.
I would, to the best extent possible, educate my children as to what military service actually entailed, and then I would let them make the decision based on their values and life goals.
I'm just suggesting that when the military is actively engaged in operations that many people dislike, that has an impact on the quantity and caliber of people that are interested in being part of it.