It is a troubling account (whether one considers it as actual history or not). It should be noted that the actions of the offending men were not taken lightly. Verse 3 of CH 20 calls it an "awful thing". In verse 7 it's called a "lewd and disgraceful act". Verse 30 of CH 19 says that 'such a thing has not been seen or done since Israel came out of Egypt'.
It certainly is not a sugar-coated story. A lot of people end up looking really bad, and one does wonder how God could look down upon it all.