In fact, the rigorously theological Imperium, in which any heresy against the God-Emperor is punishable by several of the more eccentric forms of violence, is propped up by the Mechanicus, who openly worship machines, and the Space Marine Chapters, who each have their own wacky and heretical Emperor Cult, but who's going to tell them to change?
For some reason, this is subverted with the Steel Snakes chapter of the Space Marines, who were mercilessly eradicated for their worship of the Emperor as an animal totem. One step too far out of dogma?
For most Space Marine chapters, the fact that they are literally descended from the God Emperor himself (in a manner of speaking) gives them a free pass from accusations of heresy by the Ecclesiarchy, provided that their deviations from the belief in the divinity of the Emperor are discrete and kept to themselves.
The Mechanicum gets around it by simply saying that the Omnissiah (their machine god) is simply an aspect of the God-Emperor. It is this technicality that makes their own religion tolerable to the mainstream Imperial Cult.
Some types of Ork also qualify. Burna Boyz are pyromaniacs carrying backpacks filled with promethium and willing to set their buddies on fire, but are useful in battle and for metal work. Weirdboyz have a habit of making heads explode, but their powers can be directed at their foes if they focus. Mad Dok Grotsnik performs surgery unorthodox even by Ork standards and often times his bionics will "mysteriously" explode if the owner annoys Grotsnik, but he saved the life of his tribe boss and is highly dangerous in battle.
Quite a few inquisitors tend to be rather... eccentric, to say the least. They can be rather affable at first glance, or maybe a bit weird depending on how radically they lean, but don't take that as a sign of weakness, or they will kill you on the spot, and that's just if you're lucky. Remember, these are the people who can eliminate entire planets at the snap of a finger, so...
The entire Space Wolves chapter of Space Marines. They've pretty much entirely discarded the rulebook, deviating wildly from the official code in terms of force organisation, tactical doctrine, career progression, personal grooming, and not occasionally turning into a gigantic berserk werewolf-thing, but have escaped official censure through a mixture of unerring loyalty to the Emperor and sheer badassery. There are plenty of other chapters that have their share of deviations, but most of them are extremely secretive about it. The Space Wolves don't even pretend to play by the rules.
Any RPG with Flaws, such as Shadowrun or GURPS, makes it fairly easy to make this kind of character - if your DM will allow you to get away with flaws that are merely amusing rather than especially detrimental.
And even if detrimental, so long as they aren't specifically die based, you can probably change them to amusing in certain encounters if you play the cards right.
Shadowrun actually makes a point of saying the Awakened (anyone capable of using magic) are often even quirkier than other characters. Due to the rarity of magic-users, they are able to get away with things that would make anyone else unemployable. Just picking to come from a shamanic background may result in built-in personality issues even before you get around to inventing ones specific to your character.
There's also Dr. Desmond Bradford, head of the Coalition State's Lone Star facility. He nurses a serious God Complex, performs illegal and extremelly dangerous genetics experiments without batting an eye, has people killed whom he suspects know too much and even drops subtle hints that he was behind it, and flaunts his intellectual superiority at every opportunity. But he's also the only man smart enough to have figured out how to get the Lone Star Complex, a laboratory from before After the End, running, and continues to prove his brilliance time and again. To completely solidify his job security, he's a close childhood friend of Emperor Prosek's. These two factors combine so that even the Emperor's beloved son is unwilling to express his doubts about Bradford without ironclad evidence, which Bradford is too smart to let happen.