Traditional Balinese houses are surrounded by a high wall and the compound is usually entered through a gateway backed by a small wall know as the aling aling. It serves a practical and spiritual purpose, both preventing passers from seeing in and stopping evil spirits from entering. Evil spirits cannot easily turn corners so the aling aling stops them from scooting straight in through the gate
More details about
Balineses temples ?