The extraordinary U.S. intervention is the latest window into Trump’s often-chaotic, loyalty-based approach to geopolitics.