"There can be daemons in a secular cosmos, Garviel. Just as long as we understand the use of the word."
- – Warmaster Horus, Horus Rising
"If once we can produce our perfect work — the Materialist Magician, the man, not using, but veritably worshipping, what he vaguely calls “Forces” while denying the existence of “spirits” — then the end of the war will be in sight."
- – Screwtape, "The Screwtape Letters" by C.S Lewis
"The mistake we make is to attribute to religions the errors and fanaticism of human beings."
- – Tahar Ben Jelloun
"I have seldom seen a more powerful argument for the fallen nature of man, and his inability to achieve perfection, than those countries in which man sets himself up to replace God with the State."
- – Peter Hitchens
The Imperial Truth is the atheist rationalist doctrine espoused by the Emperor of Mankind as part of the Great Crusade. According to the Imperial Truth, the Emperor believed that religion and superstition had divided mankind too much during its history (on one hand, the Emperor had reason to believe since he'd lived through most of Terra's religious wars. On the other hand, these were motivated by secular reasons, defensive responses or fanatics who would have simply attached their obsession to something else if they had no religion at the time). Thus did the Emperor become an extreme militant atheist who violently purged the religions of Terra. His plan was for Imperium of Man to become a secular state espousing science and reason (based on the Emperor's conjectures linking religious worship to the powers of Chaos, as seen below). Although, the science and reason thing didn't shake the religious trappings and presence (such as angelic figures, demons, and various vernacular and art quirks of the Imperium). Unsurprising; it's easy to convince someone that there is no buff guy in the sky throwing lightning bolts when you can prove it, but when confronted with something like "everything exist because God says so, the end" you can't really disprove it since anything you use was "created by God" or religions focused on an afterlife because A) can't be dis-proven even in 40K and B) souls actually do go to the other side of the Warp assuming nothing catches them and so that would actually encourage afterlife religious belief. Following the Horus Heresy and the Emperor's internment on the Golden Throne, the Imperial Truth collapsed, the Emperor's very own philosophy denounced as HERESY wherever it was not simply forgotten, and the Imperium of Man has become a theocratic dictatorship where questioning anything results in a painful death.
While the Emperor was viscerally against religion as a concept, attributing to it many of the woes that had plagued Mankind's history (a highly arguable point of view at best, defamation at worst), he didn't just ban and purge religion simply because he disagreed with it. During his millennia of existence, the Emperor had come to partially determine the nature of the relationship sentient life had with the Warp. Knowing that the belief in gods would only serve to create them and empower the Warp creatures, the Emperor hoped to starve the Chaos Gods by denying them worshipers. Because creating and worshiping loving gods who protected humanity from the extremes Chaos represented would be a bad idea because...? Oh, right, da Emprah was also a control-freak to a degree.
This was doomed to failure from the get-go since the Emperor had failed to realize that the Chaos Gods were powered not only by faith, but also by raw emotions. People going about their daily lives experiencing their normal emotions would still empower the Chaos Gods. Also the same behaviors and traits some, such as the Emperor, hated and associated with religious people are also found among the non-religious. He also failed to realize that faith was actually the greatest weapon against the Chaos Gods, what was needed was an alternative to direct the belief at such as a God, a God-Emperor or the religions that existed at the time before Emps decided to go all Stalin on them. In fact, the Emperor may even have BEEN Stalin and Soviet Russia - the first nation in history with an avowed goal of purging religion and replacing it with atheism - might have been a precursor to the Imperial Truth. Faith enables a Guardsman to kill a daemon (sometimes) because that Guardsman believes so utterly that it becomes real for that daemon. Given the deeds of normal humans in the fluff which do not even involve daemons and still amount to things even a Space Marine would be impressed by, it is likely that faith and the Warp related to humanity goes beyond just fighting Chaos. Heck, look at the Acts of Faith for the Sisters of Battle as an example. Freaking Living Saints, even (potentially).
The final deathblow for his case came when proof was found during the Horus Heresy that faith in something else, and by extension other religions, actually hurts Chaos. While a non-religious creed against Chaos (like what the Interex had) can fend them off, at most this would achieve a stalemate until a controlled psyker decided to go outside the lines. But theistic religiosity proved superior since it gave the means to actually take the fight to Chaos, beat them back and, MAYBE... one day, even defeat the Chaos Gods.
When Horus had a vision of the 41st millennium, part of his instant patricidal rage was that the Emperor was abandoning the Imperial Truth by seeking to become a real god (which made the Emperor a hypocrite if true). This in turn convinced him to renounce the Emperor. And then start worshiping the Chaos Gods. (Look, Horus was a dumbass).
An alternative view is that the Emprah's plan wasn't to actually kill the Chaos Gods but to remove them from the Materium (in hindsight we know how hilariously ridiculous that idea is). The Emprah had a few major pet-peeves: religion, uncontrolled psykers, unregulated xenos and warp travel. Without Cultist-chan and chaos-worshiping xenos, there would be no summoning of daemons. Without uncontrolled psykers, few possessions would occur. Without warp travel, there would be few opportunities for Chaos Gods to fuck Man up. Thus, without religion, xenos, psykers and warp travel, the Chaos Gods and their minions wouldn't be able to access the Materium (for the most part). Who gives a shit if the Chaos Gods are powerful if they are unable to do shit with that power? Answer, Emprah knows BEST!!!! (Although the Emprah withholding this knowledge from nearly everyone, including his own sons who are out on their own all over the galaxy, probably wasn't the best idea since knowing the enemy is the first step in fighting it.) However there was one big problem with this idea in the form of the Eye of Terror, which would still be providing a connection between the Materium and the Immaterium even in Emps purged religion, uncontrolled psykers, warp travel and aliens (not to mention humans are fallible and entropy is a thing, so a controlled psyker can become an uncontrolled one).
Unfortunately, any doctrine based upon scientific materialism and skepticism doesn't work in practical terms in a universe where gods are real and active (whether you believe in real life or not, they are most definitely there in 40k) / eternal & ethereal souls exist / people come back from the dead / technology is animistic / prayer actually works / sorcery does not require being a psyker / failure to burn enough witches at the stake makes your world a putrid mess with rivers of pus / Red 'Unz do go Fasta! / and the second most advanced race in the settings is religious, works on prophecies and ghost powered mechanized support. Chaos in particular is especially irreconcilable with such things, as everything about it is contradictory and unpredictable. Not only will trying to observe it make you go insane, replicating it would almost certainly destroy all of reality even if it didn't work.
The Tau tried treating things scientifically on Kronus (Eldar weapons), Kaurava (Living Saints), and Medusa V (analyzing a warp rift). In the first two cases they could not understand a thing about how they worked, and on Medusa they basically made the scientific equivalent of "Here be dragons".
Magnus said that the Warp is just another type of knowledge to be used. The Warp, in turn, made him its bitch. Even ignoring that, there is nothing "possible, observable, and repeatable" when it comes to the Warp (before Mortarion fell to Chaos he believed this and attempted to put it into practice, which got him fucked up by a Daemon he wanted to interrogate), and many other things in 40k. It's well, chaotic, the hate, anger and madness of uncountable beings in the Galaxy. There is nothing rational about the emotional refuse of sentience, and trying to apply scientific principles to them is a waste of time at the absolute best.
Still, why wasn't the Emprah more straightforward? He could have said: "There are no gods, just alien dimension energy beings that are so fucked up, they think they are Gods. They are lying and will fuck you over." But he probably didn't do that since the whole idea of the Great Crusade was to eliminate such creatures, and telling everyone about them like that would only lead to overzealous idiots making contact with 'the monsters' in an attempt to cage or eliminate them (a trait sadly common in his sons), and that would open its own can of worms. Another reason for him not to tell anyone is that what counts as a "god" is entirely up to each individual person. To the Greeks, Zeus and Poseidon were gods. To the Christians, Zeus and Poseidon either do not exist or do not count as gods because they are more limited than the Christian God. It's all subjective, which means telling people about Chaos and daemons would still cause huge numbers of people to decide they're gods which A) would make them stronger due to that belief even if the believers hated them and tried to fight against them and B) a lot of the people would start worshiping and following them like wet-rot under the carpet.
The Emprah's own biggest fuck up was not trusting Mankind or even his own Primarchs to be able to cope with the actual truth of the matter, the existence of eldritch entities in general without falling on our knees to worship them. Extra stupid points since the war against the Men of Iron happened after a daemonic invasion of human space, to say nothing of the Age of Strife's frequent wars against daemons. Humanity had more than proven that we weren't going to join the fuckers. The Emprah was like a manager that hides vital information from his employees because he doesn't think they can cope with the big picture, then the company falls apart when an engineer pisses off a major customer because of some unknown piece of said info. That is WH40K in a nutshell.
Perhaps it was more than anything the fact the Emperor knew in his heart of hearts too many people resented the Great Crusade, as in all wars there is a losing side, even if they became part of the Imperium there is still lots of people who saw their worlds shattered, they would be the first ones to give Chaos a try, not because they need to believe in something but as an attempt to escape their deplorable condition and take revenge upon those who enslaved them.
If the Imperial Truth is even known about by the time of 40k is uncertain, although more than likely the term is now used as pro-imperial propaganda by Imperial Missionaries trying to sell worship of the Emperor to disbelieving locals on your newly discovered savage world. In fact the novel Hammer & Anvil flat-out says that's what it is. Some Chaos Space Marines might remember it, but due to their worship of the Chaos Gods none of them follow it, with the exception of Fabius Bile.
Most Space Marine chapter and the Adeptus Custodes as a whole also teaches their forces their own versions of the Imperial Truth. However because the Imperium needs the Emperor's elite creations and would not survive without them. The Inquisition officially considers their beliefs considered variants of the Imperial Cult. Well, that and the problem that if they called out the Astartes, the Astartes and their supporters would point out that the Astartes beliefs are what the Emperor told them to believe, so only a dirty heretic would try to stop them. Guilliman himself completely abandoned it shortly after his return, and after being saved by a Living Saint during the Plague Wars he's seriously started to wonder if Lorgar and the Ecclesiarchy actually had it right all along.
* Note the word "wasn't" is strictly past tense, which is kinda important.