#Why did Yahweh tell Moses write about the battle against the Amalek?

Yahweh told Moses to write about the battle in a book, because Yahweh will completely blot out the memory of Amalek from under the skies. [17:14]