I'm wondering if you have written anything on Judges 19-20. I’m primarily interested in understanding why this story is in the Bible and what God would have us take away from it.
No, I’ve not written anything on this passage, but I vividly remember reading it for the first time as a young Christian in high school! I think part of the reason it is there is to demonstrate the horrible consequences of the diagnosis described in the final verse of Judges 21:25, “In those days Israel had no king; everyone did as he saw fit.” When everyone does as he sees fit, there is moral chaos, and this account is one of horrific moral chaos that twists the gut of the reader, deliberately so, motivating us to seek to place ourselves under the authority of God. Here is a quote from New Bible Commentary[i] regarding one aspect of this passage:
Apart from triggering the main action which follows, this opening episode [Judges 18:1-28] serves two major purposes. It shows us how debased even such a noble thing as hospitality had become in Israel in the judges period, and it throws significant light on the character of the Levite, who is to play a key role in episode 2 [Judges 19:29-21:25].
[i] Carson, D. A.: New Bible Commentary : 21st Century Edition. 4th ed. Leicester, England; Downers Grove, Ill., USA : Inter-Varsity Press, 1994.