How mergers magnetise massive stars