Also, David thanks God for making him a stouthearted manI think you're underestimating what women could or were supposed to do, even in those days. The Torah expected women in such cases to scream or resist (if in the vicinity of others). Her resistance could have made David very angry or worse, but God would have expected her to cop his anger rather than sin against God and her husband. Joseph went to jail for two years for his righteous refusal.
Mosaic Law required trials and hearings indeed, but the judge ultimately was the king himself (e.g. Solomon's case with the two prostitutes). That creates some context for a time where there was war, treason, political intrigues, coup d'etats - he had the authority to intervene directly himself in these cases; they could be matters of life or death for the monarchy.
David fought many wars - yet God calls him a man after God's heart (1 Samuel 13:14), a prophet, a man with compassion even (e.g. the story about Mephibosheth (2 Samuel 9), sparing Saul's life twice (1 Samuel 24 and 26)). Israelites and Jews after him would speak with high esteem and affectionately about him - even in Jesus' day - they wouldn't use the 'tyrant' qualification which is negative by definition.
Upvote
0