In addition to ROIMaison's excellent, referenced answer, here's a simple, practical, common sense reason:
While there is a lot of empty space around the bombs themselves, the plane can only carry a maximum amount of bomb weight. If all that empty space were filled with bombs, racks, and all the other mechanisms to load and drop them, the B-29 would have never gotten off the ground.
If that space had been enclosed with extra sheet metal to make it precisely match the amount of space the 20,000lbs of bombs needed, it would have taken extra metal, which was in short supply in war-time, would have taken extra time to construct, and would have added to the gross empty weight of the aircraft, reducing the bomb carrying capacity.
There is simply no reason to make the bomb bay "hug" the actual space that's needed for all the bombing mechanisms. The fuselage was the size it was to accommodate everything else the plane needed to do, and leaving empty space just simply isn't an issue.
An additional up side, it probably made it much easier for maintenance crews to get into the bay to check and maintain the bomb racks. This gave them some working room instead of them having to cram themselves into a Goldilocks-like "just the right size" space.