Chinese founded the art of Feng Shui. Feng Shui is the art of harnessing good earth energy or Qi to prosper human beings. This has lead to the founding of Yin Feng Shui or Burial Feng Shui and the main objective is to benefit their descendants in health, wealth, descendant luck, relationship, achievements etc.
Later this art found it’s way to Living Feng Shui or Yang Feng Shui which means houses, offices, temples, palace, city and so on. This came about because Chinese believe there are also Qi above the ground that can be used to benefit Live people.
Essentially, humans are made of energies and we receive and emit energies despite that we may not be aware of it because we cannot smell it, feel it or see it.

But why temples and ancestral halls? They are neither alive nor dead, they are just statues or plaque. How does it relate to Feng Shui? How does it benefit the descendants?
This part is a little cultural and partly feng shui. They should be collectively be called spirits being. Spirits are also a form of energy but dwell in different planes of existence or perhaps different frequencies.
Ever hear of some people who have claimed that they can see ghost and this is probably due to the reason that their energies is close to the spirit’s level or frequency.
Anyway, ancestral worship too has it’s deep roots in China particularly attributed to Confucius teachings on filial piety. Thus if a person is not strong in his Feng Shui knowledge, they will tend to mix up Confucianism with Feng Shui and become confused.
The photo below is a typical example of an Ancestral hall (Left side) & they are usually is built next to the Temple. One one unique thing about the ancestral hall is that they keep the ancestral family book. This the way how Chinese trace their roots to their ancestors even after many generations.

Chinese believe that spirits needs an object to dwell in order for them to be “in existence”. Just like how our soul reside in our physical body. So when our soul leave the decayed body, they can reside in an object and this object is usually like a plaque or statue. This explains why Chinese like to pray to an object/statues but in reality they try to connect spiritually to the object/spirit and not the object per se.
Chinese also believe that when their ancestor is benefitting from good energy, they will also benefit from it in the form of good merits. This is also believed in Buddhism which originates from Indian continent that we benefit from our ancestor’s merits or we can transfer merits to them to reduce their sufferings. In general,most Asian culture believe that spirits are part of us and we are connected through some form of cosmic energies.
When the spirits of the ancestors receives good energies they can also transmit these good energies back to their descendants. The descendants will also benefit in the form of good frequencies of energies.
Thus this is why Chinese do pay attention to the Feng Shui of the their Ancestral Hall.