It looked like a great negotiating tactic to me.
Mexico will be at the NAFTA table considerably weakened and their US corporate supporters silent.
Walking away is a big part of negotiations as Trump has said himself many times. I think that refusing to participate will only make it more expensive for Mexico.