For many thousands of years, the ancient Chinese believed in many gods, goddesses, magical beings, dragons, and ghosts. They prayed to gods for help and safety. They also prayed to their ancestors to protect them from harm.
The kitchen god was an important god. His job was to report to his boss, the Jade Emperor (another god) on the behavior of everyone in your household. No one wanted to upset the kitchen god or the report might be bad. A bad report meant bad luck would follow you all year long!
It during T'ang times that China embraced two philosophies and one major religion at the same time. They were called the Three Teachings. They were an important part of daily life. The three were Confucianism, Taoism, and Buddhism. Each day, each person would do something to honor each of the three teachings each day. For example, a man might honor his ancestors by following a rigid social rule (Confucianism), practice breathing exercises (Taoism), and stop by a temple to pray (Buddhism), all in the same day. This is not to say the ancient Chinese stopped believing in other gods, like the powerful kitchen god, but these three doctrines were very important.