Strong’s H6942 קדש qadash, “to be holy.” The first letter is a quph, but according to the Ancient Hebrew Lexicon, the quph was transposed from an original chet, making the ancient pictographs chet + dalet + shin.
chet ח = the wall, thus outside, divide, half
dalet ד = the door, thus enter, move, hang
shin ש = two front teeth, thus sharp, press, eat, two, again
A wall makes a separation (chet) between two parties. When one comes through the wall via its door (dalet), the two parties (shin) can be joined together.
Huh. A wall allows two separated parties to be joined together via the door, and that is the meaning of “to be holy.” Besides the obvious Messianic implication, it does not sound like walls are immoral to me.