Our Rabbis have taught: For three reasons shall no person enter a ruin; because of suspicion (of an immoral intention); because the ruin may cave in; and on account of demons (dwelling in ruins).
For Three Reasons Shall No Person Enter a Ruin Because
Ein Yaakov, Berakhot 1:10