Symbolism, Imagery, Allegory
When the Prophet Nathan tries to get David to see the grave sin he committed by seducing Bathsheba and having her husband murdered, he decides to use an age-old tactic: a cute but sad story with animals in it. To refresh your memory, the story is basically about a rich man who steals a poor man's beloved ewe lamb to serve it to a guest.
It's a successful piece of melodrama.
Aside from using the lamb and its owner as symbols of innocence and goodness thoughtlessly betrayed, it's important to note one more thing: the Pulitzer-Prize winning scholar and biographer of the Biblical God, Jack Miles, points out that this is the first example we see in the Bible of an ancient Israelite owning a pet.
It's kind of touching and interesting to see that people nearly three thousand years ago could get attached to domesticated animals as readily as Farmer Hogget in Babe in the present era. That'll do, ewe lamb. That'll do.