It seemed...
It seemed, Allah had decided to show his authority, here, and by demonstrating how a king, with all that glory and abundant force could be destroyed by a lad inexperienced in fighting, and particularly with an apparently simple and worthless tool, a sling.
Then it says: "...and Allah gave him the kingship and wisdom and taught him of what He willed...." In this verse it has not been explicitly stated that this David is the same David who was the great prophet of the Israelites and was Solomon's father, yet the above mentioned phrase of the verse indicates that this David had attained the rank of Prophethood. At the end of the verse, the Qur'an points to a general law, thus it says: "...
And were Allah not to repel some people by means of other people, the earth would certainly be full of mischief; but Allah is Gracious to all (His) creatures." This concluding part of the verse clearly indicates that the only, aim or object of…