The reason was to give the bombs the place close to the center of gravity.
Wing sweep (for high cruise Mach numbers) in combination with a high aspect ratio of the wing (for low induced drag) made it impossible to place the landing gear in the wing, so it had to be integrated into the fuselage. The main landing gear normally needs to be close to the center of gravity (slightly behind for a tricycle gear, slightly ahead for a taildragger), but this space was needed for the massive bomb bay. Since the bombs will be dropped somewhere along a bombing mission, dropping them should not upset the balance of the aircraft, so no compromise was possible.
B-52 cutaway drawing showing the two bomb bays in the center of the fuselage (picture source)
This problem existed already during the development of the 6-engined B-47 a few years before. In both designs, two pairs of landing gears were chosen, one pair ahead and one pair aft of the bomb bay, and the aircraft lost its ability to rotate for takeoff. Due to the powerful fowler flaps the attitude in cruise and at slow speed could be made identical. The downside is more drag during the take-off run, since the wing produces more lift, but this could be tolerated in a strategic bomber with air refueling capabilities.
B-47 on approach with gear down and drag chute deployed (picture source). Note the outriggers between the inner pair of engines - those were needed to keep the aircraft level on the ground.
B-52 in flight with gear down (picture source). Here the forward and aft gear of the B-47 have been replaced by pairs of gears to distribute the load over eight wheels and the outriggers are positioned outside of the outer engine pair, but the general gear configuration is fairly similar.
The Russian design bureau Myasishchyev found a different solution for their M-50 supersonic bomber in the mid-50s. They also had to put the bomb bay into the center fuselage and the main gear had to be placed so far aft that the M-50 could not be rotated the usual way with the elevator. To solve the problem, the engineers devised what they called the "galloping bicycle". When the aircraft reached 300 km/h, the forward gear rapidly extended to rotate it to 10°.
Myasishchyev M-50 with extended front gear strut (picture source). The two open doors under the cockpit were for the pilot and navigator: Their downward-ejecting seats would be lowered on cables for the crew to be strapped in at ground level, then winching themselves into place.
Adding to the excellent Peter's answer who explained why for this particular model the wheels are placed far behind the centre of gravity (CG), I would like to clarify why this makes impossible to rotate at take off.
A standard aircraft takes off right after the rotation, increasing the angle of attack and the lift. Before and while performing the rotation the lift produced by the wings is not enough to raise the position of the CG. Still, with the wheels placed right behind the CG, a small raise of the CG is required during the rotation. This is accomplished with the down force produced by the elevator and its big leverage.
If the wheels are moved backwards, then such lever becomes much less advantageous: the force produced by the tail on the CG is weaker, because the fulcrum is closer to it and farther from the CG. The maximum elevator down force and the structural strength can then make the rotation impossible.
The angle of attack of the wings of a B-52 is positive. The leading edge of the wing is higher than the trailing edge. So when you see the aircraft takeoff it seems to not rotate, but when the fuselage is level, the wings are at a positive angle of attack. When the B-52 is in level flight, the nose is down, you can not see the nose from the cockpit and it is like you are sitting on a cloud.
The B52 does "rotate" on takeoff just not to the degree of what seems normal for such a large jet.
All airplanes must produce lift that is greater than the opposing force of gravity/its weight for it to leave the runway. When lift = weight/gravity the airplane is in a stable state, which means the rate of climb or descent will be constant. This means unless the lift exceeds the weight an airplane will never leave the ground. Once in flight the airplane's rate of climb stabilizes, or becomes constant when lift = gravity/weight (the opposing force).
The answer is it only appears the B52 is not rotating. The pilots are applying "up" elevator and increasing the angle of attack of the wing, thus increasing lift.
I will throw a correction to an answer given above:
The CG, center of gravity, is fixed and unless a weight/load moves within the airplane it never changes. Examples of things which would change an airplanes CG are fuel burn off, bomb dropped, or a cargo shift.
When the elevator is moved the airplane "pitches" up, because the tail (horizontal) stabilizer is producing "negative" lift (it pushes down on the tail), and rotates the airplane along the CG. The placement of the landing gear actual opposes the rotation of the airplane in most designs. The change in "angle of attack" of the wing due to the pitching up increases the lift produced by the wing.
The placement of the landing gear is a compromise based on the design of the airplane. The B52 and its tandem wheel set is a compromise because of the wing and body design of the airplane.
Add one more thing to prevent confusion:
When an airplane "rotates" for takeoff the force (or weight) of the horizontal stabilizer must be greater than the weight of the airplane in front of the rear most wheels for the airplane to "pitch up."
Most (if not all) large transport type large airplanes the whole horizontal stabilizer (compared to just the elevator on smaller airplanes) is trimmed for take off to provide a "neutral" force for the desired takeoff speed. If the stabilizer trim is set incorrectly there may not be enough "elevator" to either pitch up or to prevent a spontaneous un-commanded pitch up of the airplane. Both are disastrous and the results of which can be found on youtube.
I may have missed it, but it seems none of the answers addresses the main issue: why it does not rotate and climbs out in a nose-down attitude?
All of this will be clearer if you remember that lift depends, mainly, on angle of attack and speed.
The main way for any conventional airplane to take-off (and land) without rotating in pitch is by making the angle of incidence of the wings (approximately the fixed angle with which the wing attaches to the fuselage) equal to the take-of angle of attack with the aircraft parked on the ground. This way when the B-52 reaches its design lift-off speed it will takeoff in the same parked attitude. AS it accelerates it has to reduce the angle of attack from max lift to climb lift, which is lower due to higher speed and the upwards help of the engines,so it has to pitch down. When it reaches its cruise speed, it needs a very small angle of attack for the same lift and, to reach it, the nose must be pitched down even more.
This increases the drag of the fuselage, tail etc.; but is part of the compromise made to avoid rotating on take-off (and landing).
At max speed the B-52 flies with the nose markedly down, which can be seen when it flies in formation with faster aircraft.
It must be noted that long-range aircraft normally set the wing's angle of incidence close to their optimum cruise speed angle of attack, which is very low compared to their max lift angle of attack. These angles all vary with weight, other non-standard design variables. The goal is to cruise with the fuselage aligned with the relative wind (from the front) to reduce drag.
BTW, glider pilots practically also do not rotate during take-offs and get their take-off lift from the speed of the tow plane.
I've never seen a source for this explanation; but this is the result of an analysis based on my experiences as an aircraft designer and pilot. Tried to make it a bit less complicated than it is, rigorously speaking..
I thought I have witnessed - and a B-52 navigator (Maj, USAF) once told me - that the tail wheels actually come up off the ground first. Or at least will, if left alone with no control input, I forget exactly what he said. But basically unlike any other aircraft, the placement of the tandem gears and the super large horizontal tail allow for a lifting moment of the rear wheels off the ground before the fronts can be lifted off, if care is not taken.
The angle of incidence on the B-52s wing is very steep, at 8° nose down. This is compared in this example to airliners, which have a 2° or 3° nose up angle of incidence. If left alone, when airspeed increases enough to lift the aircraft, the rear landing gear will lift off first. When I flew the simulator, (and I noticed this on subsequent flights) the tail of the airplane would sort of 'wiggle'. Aside from airspeed, this was an indication to apply elevator to bring the nose up. Most of the time, all 4 main gear lift of at the same time. Sometimes the forward gear would come up first (but not by a lot). But since the angle of incidence is so high, the aircraft wants to fly nose down, which is backward of 'normal' aircraft.