Yes, he did. He bowed to the emperor of Japan.
When I was a young lieutenant I had a buddy on the General's staff. Her job was protocol officer and she did all manner of things, like make sure the seating was right when the General gave a dinner and made sure that The General was briefed on social niceties before each event. Basically, to make sure that The General didn't look like a buffoon at events where the press or photographers might be present.
Does not The President have a protocol officer? Someone to tell him that Americans don't bow to anyone? It doesn't seem so, does it? And, our President is not accustomed to being an American, so he's not sure how he should act. It's embarrassing.