While Confucius was not intimately concerned with worship practices, you have to remember that philosophies often take on a life of their own after the passing of their founder; Confucius's instructions for his followers to diligently administer appropriate rituals arose in a very religious cultural context, and that context absorbed the students of Confucius until you could no longer distinguish them with assurance. Confucius himself was venerated like a deity in later dynasties, and his descendants received a stipend from the Emperor to carry out the appropriate familial rites. Furthermore, Confucians accepted the Duke of Zhou's theory of the Mandate of Heaven from at least the time of Mencius; Emperors would offer annual sacrifices to Heaven in recognition of where (according to Confucians) their mandate to rule derived. The Legalists, on the other hand, were not so concerned with the rights and wrongs of personal morality, but more with how to run an effective and powerful state. Ritual, theology, etc weren't important to them, and since they only controlled one of the Warring States, they didn't have the time to get absorbed into the religious orthodoxy that Confucianism did.
You see this Confucian religiosity quite explicitly in the writings of Yu Zhi, a failed examination candidate who worked as a wandering preacher during the Taiping Rebellion. He had a fairly simple message; the rebellion was Heaven's punishment for the people's sins, so they must repent and change their ways to avoid disaster. A key player in this nexus of reward and punishment was Wenchang Wang, the patron saint of examination candidates, scholars, and bureaucrats. Lord Wenchang was widely venerated by Confucians; he would aid scholars in their examinations, and kept the Cinnamon Ledger in the underworld, where all men's deeds and their fates were recorded. Yu Zhi was a devout worshipper of Lord Wenchang, and Confucians believed that the written word possessed talismanic power, and should not be used lightly; writing on paper that was meant to be thrown away or exposed to the elements was improper, and Yu Zhi encouraged people to treat it with the proper respect.
All over Jiangnan, towns had local philanthropic societies that operated out of the temple to the city's god, and Yu Zhi was closely involved in these societies; they would collect tarnished written words and burn them with the proper respect, give lectures on the Sacred Edict of the Kangxi Emperor, solicit donations for the upkeep of militia forces, encourage the timely payment of rent and taxes, and hosted spirit writing sessions. These actions were all construed as a way for individuals to accumulate merit, and by so doing escape Heaven's punishment. In one of Yu Zhi's parables, a middleaged primary school teacher named Sun Yunji was visited by the City God, who offered him a job in the underworld keeping ledgers of men's deeds and fates; Sun initially declined, saying that he was needed on earth to provide for his sickly mother. Impressed, the god gave him some temp work; Sun fell into a coma for seven days, and as payment, he and his family escaped Nanjing under divine protection just before the rebels conquered the city.
It's a bit of an academic thing to try to divide up religion and philosophy and common cultural practices, but often they're inseparable; regardless of Confucius's equivocation on spiritual matters, his students developed a complicated framework of communally shared theology, ritual, and mythology that really does warrant the term religion.
Tobie Meyer-Fong has a chapter focused on Yu Zhi in her book What Remains: Coming to Terms with Civil War in Mid-19th Century China.