He accepted the invitation from an important neighbor country. He flew down to Mexico. He had a talk with the Mexican president. I dare say the Mexicans have a few things they want from us, and The Donald has a few things he wants from Mexico. Since The Donald isn't president (yet) he is in no position to grant the Mexicans anything, and the Mexicans certainly cannot make any concessions to a man who may never be president. So they had a meeting. They issued bland but friendly communiques afterward. And that is exactly what they should have done. Even if they didn't achieve anything of real substance, just issuing a friendly press release and a friendly communique is a good thing. Don't knock it.
Hillary was on TV knocking it shortly afterward.