Devarim / Deuteronomy 22:8 · Drash
כִּי תִבְנֶה בַּיִת חָדָשׁ וְעָשִׂיתָ מַעֲקֶה לְגַגֶּךָ וְלֹא־תָשִׂים דָּמִים בְּבֵיתֶךָ כִּי־יִפֹּל הַנֹּפֵל מִמֶּנּוּ׃
When you build a new house, you shall make a parapet for your roof, so that you do not bring blood upon your house if anyone falls from it.
Drash דְּרָשׁ
A vicious dog and a shaky ladder
Something may stand in your house that will one day hurt someone. As long as nothing has happened, it seems there is no danger.
Midrash Tannaim: the Almighty knows this person will fall, but does not want the harm to come through you. You are like a watchman set over the house. Rabbi Natan in the Talmud: from this verse, one may not keep a vicious dog or a shaky ladder at home. Midrash Aggadah: this person's fall was destined since the six days of creation.
How Midrash Tannaim, Talmud, Bava Kamma, and Midrash Aggadah explain it
Midrash Tannaim Another explanation: if the faller falls
The Holy One, blessed is He, said: it is revealed and known before Me that this person will in the end fall from it. But I ask that the mishap not happen through you. As it says: "Son of man, I have made you a watchman for the house of Israel" (Yechezkel / Ezekiel 3:17).
Talmud, Bava Kamma From the words of Rabbi Natan
As it was taught: Rabbi Natan says: from where do we learn that a person should not raise a vicious dog in his house and should not set up a shaky ladder in his house? The verse teaches: "Do not bring blood upon your house" (Devarim / Deuteronomy 22:8).
Midrash Aggadah So that you do not bring blood upon your house if the faller falls from it
This person was destined for this since the six days of creation. But take care that this guilt does not come through you and that you are not called guilty.
Takeaway
Yechezkel (Ezekiel) is called a watchman: if he does not warn the wicked, that one's blood will be required of him (Yechezkel / Ezekiel 3:17–18). Midrash Tannaim puts the owner of the house in the place of such a watchman.
From Rabbi Natan's words the Talmud learns: the owner answers for danger in his house even if the harm was done by a dog and not by him (Bava Kamma 15b).
"Since the six days of creation" is how the midrash speaks of what was decided in advance. Rashi gives the same answer on this verse.