Obama has been the US president now for eight years. This isn't his first foreign junket.
50,000 US servicemen perished fighting the Communist forces of Ho Chi Minh.
Obama and his advisers were certainly aware that Ho loomed large in this photo-op.
Without rehashing the entire mindset of western nations fighting the "war of containment" and the "Cold War," it probably is presumptuous of us to assume that the US can control all aspects of various photo-ops when visiting a host nation like this. In some cases we might be able to influence where a photo of two leaders is taken, but I bet in nations like Vietnam and even China our influence would not be so great. For Vietnam itself, that is an important leader from their past regardless of how it impacted our foreign policy.
That said we have a much more important issue to discuss. That would be what lifting a 40+ year US arms embargo against Vietnam means to the growing tensions from various disputes related to South China Sea islands and patrolling.
China and Vietnam disputes is only one aspect of the story, there are interests in this disputes for the greater area around the South China Sea involving Malaysia, Taiwan, Indonesia, the Philippines, and Japan. Relatively recently Japan sold military ships and equipment to the Philippines and Vietnam both in order for those nations to match China aggression, who themselves upped the ante a little with new equipment of their own and a militarized island for all sorts of activities.
Now you could say that the US has role here in preventing this escalation from getting any worse, in the context of our various defense treaties and our dealings with Japan. But we have problem with lifting an arms embargo with Vietnam at the very time they are in dispute with China over these waters.
We can either discuss a photo-op in a haze of political foolishness or we can talk about a more pressing matter on a potential conflict brewing between at least 6 nations for interests in the South China Sea each with military hardware floating in and around the South China Sea all pointing weapons at each other waiting for someone to fire. Including the US by the way, we have more active patrols of this region because of China military movements as well.
Photo-op complaints or chance of conflict between multiple nations?
Ahh **** it, that takes brain power... lets bitch about a photo and go for more coffee.