where im from 40k is commonly regarded as being the 'intellectual' GW game with a far richer background and history that extrapolates real-world sources in a far more mature way than warhammer (tilea = italy!), especially when it comes to character names, planet names etc - you could look up almost all character names on an encycolpedia and find a link between some real persons name and the 40k equivalent.
even the story of the primarchs and horus' betrayal is (rather obviously) 40ks version of a mythology, blending religious tales with creation myths of various cultures (sorry about the religious reference)
as a game, however warhammer far outstrips 40k (as much as i hate it), though 2nd and especially 1st ed 40k had their own charm and character - anyone remember the clear perspex 40k vehicle targetting template?
edit: im also a big fan of real world mythologies and while most would think that would make me a fan of fantasy, in fact i find the opposite to be true - 40k has much more in common with real-world mythologies than warhammer (the lovecraftian influences for instance are an obvious example)