“Forgive Your people Israel whom You have redeemed, O LORD, and do not place the guilt of innocent blood in the midst of Your people Israel” (v. 8) is very telling.
In so called “sundry laws,” these commands seem common sense. They are not merely prohibitive and kill joy, but actually to help fellow “countryman.” For example, to help find what was lost (v. 1), help restore (v. 2), help raise (v. 4), and etc. Moreover, cross-dressing is sinful because God says it is abomination.
The second half of the chapter on morality or moral laws are meant to promote and protect God’s holiness and the holiness of his redeemed. Hence, it includes purging of evil and disobedient people from the community.
There are some who believe that physical deformity (v. 1) may be a ground for disqualification from ministry (John MacArthur). This is not to say that God is not merciful or unloving. Speaking of love, love doesn’t mean granting everything what one wishes. Glad that God doesn’t listen to all prayers (v. 5). According to Yahweh, it is love for his redeemed that turned the curse into a blessing (v. 5). And he hasn’t changed. The basis for such exclusion is because he is holy (v. 14).
The first five verses deal with marital relationship, especially, the law concerning divorce. This gets reiterated in Malachi, in the Gospels, and rest of the NT.
The rest of the chapter deals with ethical behavior toward fellow men (vv. 6-22). Yahweh demonstrates protection and offers provisional laws from the weak, orphans, widows, and foreigners (v. 17). The basis for the people of Israel’s treatment toward others is because Yahweh is holy (v. 7) and that they should remember where they came from (vv. 18 and 22). In the NT, the basis in which Christians treat others is also precisely because God is holy and how he dealt with his elect in redemption. Hence, the continuity of ethics in the OT to the NT is because of the gospel. All biblical ethics have to be gospel-driven ethics. If not, they are merely morality devoid of the gospel.