You are really overestimating how much space and resources people take from the main ships systems. Even with Imperium's inefficiencies in design. At best the ship is like 2-5% heavier and maybe spends around 1% of its energy generation on all the life support and everything else related to the crew. And I'm not sure it's even a whole 1 percent considering the kinds of energies 40k ships make use of. Anti-gravity and the like are not actually related to the crew, that's just a happy coincidence that people benefit from it, it's main function is keeping the physical integrity of the ship.As an example, lets say they built a battleship using this small forge world that's about six kilometers in length. On the smaller side of battleships as far as the Imperium is concerned, but it uses that space a lot more efficiently. Lose anything like beds, bathrooms, mess halls, cargo space for stuff like food, basic amenities, probably don't even need human-sized corridors for most of the ship which would help against boarders that aren't squats or ratlings. As a result, you get a very compact warship, probably deadlier than anything of similar length assuming similar weapon capabilities.
Also corridors are not actually wasted spaces. Properly done, especially with adamantium used as main armour and bearing frame material, they act as whipple shields and dispersers for impacts and explosions. Basically a ship made without corridors will go down faster than the one with properly designed internal spaces made to channel explosions over larger areas. Crew will die in the process but that's a sacrifice Imperium is willing to make.