Trump and Macron’s relationship, explained

How did the French leader Emmanuel Macron and President Trump end up with such a cordial relationship? And what does France get out of it?