In the end of Parshas Emor (Vayikra 24:10-23), the Torah relates the story of someone who blasphemed and his punishment. After the person blasphemes, he is put in a prison while Moshe proceeds to ask G-D what the punishment should be.
In verses 14-16, G-D responds with the punishment for blasphemy (stoning). In verse 23, the Torah relates that Moshe conveyed the law and the punishment was implemented. However, in the middle of the prophecy where G-D details the laws of blasphemy, it seems to go slightly off-topic, detailing various laws about damages (verses 17-22).
Why did the Torah feel the need to include these seemingly off-topic laws in the middle of dealing with the blasphemer?
(As an aside, I could think of only 2 other instances offhand where Moshe goes to ask G-D for a specific ruling (Pesach Sheni and the daughters of Tzelafchad), and in both of those situations, the answers were limited in scope to the question. There is also the case of the Mekoshesh (H/T @DoubleAA) which has a one-Passuk response (Devarim 15:35) that is limited to just addressing the case at hand)