another thing that nobody mentioned yet is that the imperium has the space marines who are the heavily-armoured genetically-modified superhuman special forces guys, and then the vaaaast majority of the army are the imperial guard who are mostly just conscripts with shitty guns who get sent in human wave style to die en masse
there are various themed imperial guard regiments that have distinctive uniforms and fighting styles of their planet. the most popular amongst warhammer nerds are the death korps of krieg, who resemble gas-masked wwi soldiers with a german-style helmet. purely coincidentally, they seem to be most commonly painted in feldgrau colour schemes
ive read way too many 40k novels lol (yeah i read theory) and theres a huuuuuge disconnect between the different writers. youre absolutely right that the eisenhorn/ravenor books in particular are all about how incredibly dogshit the imperium is, and other books do make this clear as well
but with a lot of the space marine focused ones you can just feel the authors jerking themselves off as they write (someone should compile all the bits from the horus heresy novels where they first describe each of the primarchs in particular lol) and they are often really uncritical or apologetic about not just the space marines but the imperium itself
and of course the video games mostly go no deeper than "yay space marines"