In a society that accentuates justice, it is a shame at the highest level when there is a slain (presumably murdered) victim nearby (21:1-9). If it is unknown, then before the Lord community leaders will testify to Him their lack of knowledge concerning it. That does not mean that was the end of the matter, but the religious ceremony was to communicate to the citizens of the community the innocence of the leaders – for surely no man would swear to the Lord something that was false! If they did, it was understood, the Lord would tend to that authoritatively (if you will)!
When wars were fought it was the male that posed the greatest danger to armies in the field. Thus, it was the males that suffered the greater tragedy. What about the females? The Lord gave certain requirements in how best to address that situation (21:10-14). In relation to this, though a possible distinction is in view, there is a proper way in which the Lord wanted addressed women who were wives of men (21:15-17). How a man gained two wives is not told to us in this context, but regardless of how, he was to treat both with proper respect, and in this case, it had to do with the right of the firstborn.
The punishment of children, especially the son (21:18-21). It is presumed to be the case that the “son” in this context is one who is of an age that correction of his rebellion is now physically outside the strength of the father (though, it must be admitted that there is no age stipulation).
Application: We live in a society that regards parental authority with much confusion. On the one hand, it is the parents who are responsible for the teaching and decency that is to be in kids. On the other hand, it is the state that seems to take away some parental authority. Raising children in our current society is difficult – but it can be done, and it can be done with much success. The key is one’s devotion to the Lord. If there is devotion to the Lord, then that devotion will result in the proper instruction and the proper nourishment (emotional and physical) the child needs.