The agreement, described by Trump as giving Washington a permanent security role, comes as Denmark says it will benefit NATO and Europe.