John Newton wrote hymns. Do you know why he wrote them? To teach doctrine, of course! Yep, when he was preparing his sermons, he knew that he needed some way to drive the lesson home. So he would write a hymn that illustrated the teaching.
Interestingly, his most famous hymn was not popular in his homeland, but in mine. And "Amazing Grace" became popular first among the slaves. Isn't that ironic that a song written by an ex-slaveship captain should be an anthem among those he hurt. Of course they probably had no idea at the time who wrote the song!
Grace is what allows a slaver to become a slave for Christ. Grace is what allows me to breathe! Grace is what allows horrible situations and unfairness to be redeemed for His glory and purpose. And it is truly Amazing!