And the ANSWER is in this passage with the reason and its recorded before Prophet Samuel and King Saul.
Exodus 17:8-16 THEN CAME AMALEK, and FOUGHT WITH ISRAEL in Rephidim. And Moses said unto Joshua, Choose us out men, and go out, fight with Amalek: to morrow I will stand on the top of the...