This record emphasizes the supernatural character of the victories David was able to enjoy because God fought for him by using various men in his army. [source][source][source]
"The lists of heroes and heroic exploits that frame the poetic centre-piece represent human instrumentality, but not the underlying reality, which is Yahweh." [1][source]
The pericope may describe what happened when David was fighting the Philistines early in his reign (cf. 2 Samuel 5:18-25), probably right after he became king of all Israel in1004 B.C. [2] However, it is really impossible to tell how the incidents recorded here relate to others mentioned in the book, or even if they do. [source][source][source]
"The giant" ( 2 Samuel 21:16; 2 Samuel 21:18; 2 Samuel 21:20; 2 Samuel 21:22) appears to have been the father or ancestor of all four of the huge Philistine warriors mentioned in this passage. However, the Hebrew word translated "giant" (raphah) is a collective term for the Rephaim. The Rephaim were the mighty warriors who originally inhabited the Canaanite coastal plain (cf. Genesis 15:19-21; Deuteronomy 2:11; Deuteronomy 3:11; Deuteronomy 3:13). They terrified ten of the12spies that Joshua sent out from Kadesh Barnea ( Numbers 13:33). [source][source][source]
"The lamp of Israel" ( 2 Samuel 21:17) refers to David, the source of Israel"s human guidance, prosperity, and wellbeing-its leading light. As God was a light to His people, so the king was a source of life as His vice-regent. Similarly, Jesus is the light of the world, but Christians are to let our light shine before men. [source][source][source]
". . . when a man dies his lamp is extinguished ( Job 18:6; Proverbs 13:9); David"s death would be tantamount to the extinction of the life of the community (cf. Lamentations 4:20). The figure of the lamp, which came to symbolize the Davidic dynasty as maintained by Yahweh ( 1 Kings 15:4; Psalm 132:17), possibly derives from the world of the sanctuary, in which a lamp was kept burning "continually" (see on 1 Samuel 3:3)." [3][source]
Gob ( 2 Samuel 21:18) was evidently another name for Gezer ( 1 Chronicles 20:4). The reference in 2 Samuel 21:19 to Elhanan killing Goliath the Gittite (i.e, a resident of Gath) seems to contradict1Samuel17. However 1 Chronicles 20:5 says that Elhanan killed Lahmi, the brother of Goliath. Evidently that is the correct reading. [4] Sometimes David was able to slay his enemies personally, but at other times he had to rely on the help of others ( 2 Samuel 21:17). [source][source][source]
The point of this brief section is that God blessed David with military victories far beyond anyone"s normal expectations because he was God"s faithful anointed servant. Yahweh brought blessing through him to Israel militarily as well as agriculturally ( 2 Samuel 21:1-14). The first incident in the appendix ( 2 Samuel 21:1-14) illustrates that breaking covenants reduces fertility, but this one ( 2 Samuel 21:15-22) shows that God"s favor results in supernatural victories. [source][source][source]