Why do heavy bombers not carry air-to-air missiles?
Well, actually, they do.

Or at least it has been proposed on several occasions.

The ill-fated A-12 stealth attack aircraft was going to carry 2 x AIM-120 AMRAAMs as part of its defensive package when it went into combat.

Larger fighter-bombers like the FB-111 did in fact carry the AIM-9 Sidewinder AAM for defensive use.  And the Sukhoi SU-34 advanced theater bomber derivative of the SU-27 Flanker air superiority fighter can carry all modern Russian made AAMs, both IR and radar guided in addition to air to ground ordnance.

The EA-18G Growler electronic warfare derivative of the F/A-18F Super Hornet also carries AIM-120s for defensive use.

There is rumored to be an 'Arsenal Plane' in development by the Pentagon, which is very similar to a Cold War proposal for a VC-25 Cruise Missile Carrier Aircraft, a flying cruise missile launch platform based on the commercial 747-200 airplane.  The DoD's new 'Arsenal Plane' is rumored to be capable of carrying virtually every conventional - and possibly air-launched nuclear - weapon in the DoD's inventory, including AAMs.  Exactly what form this aircraft will take is unknown, but is supposed to be adapted from existing large cargo aircraft or commercial aircraft.

Depending on the types of AAMs desired to carry, mounting and launching them from an existing aircraft would not be a terribly difficult task.  Structural modifications would be necessary on primary components to install pylon hardpoints.  Additional infrastructure for power and datalink lines between mission systems and the missile would be necessary, and additional mission systems such as air-to-air fire control radars, IRST systems all would have to be installed.

Now a while a large aircraft could carry such weapons, their use against a fighter would be limited to stand-off launch and use in defensive retreat; the launch aircraft is just not designed to maneuver with a modern fighter in ACM, which limits the application of these systems in war.

So could it be done? Sure.  Is it a wise idea?  Well, that's debatable.

Historically, defensive armamaent for large, high value aerial assets eg bombers, tankers, transports, etc has been very ineffective.  In World War II, heavy bombers were equipped with multiple gun turrets to protect against enemy fighters.  So convinced were Allied planners that this strategy would give the bombers adequate protection, they sent waves of bombers over Germany with horrible results; the slaughter of heavy bombers over German airspace by Luftwaffe fighters nearly cost us control of the skies during the war.  This massacre only ended with the introduction of long range escort fighters to protect the bombers against enemy interceptors.  The terrible record for 'flying fortresses' protecting themselves with guns combined with the introduction of guided missiles convinced planners to eliminate defensive guns from bomber designs.  In the '50s they were limited to a single tail mounted and remotely controlled turret.  By the '60s, they were totally eliminated from new designs.  High losses to bombers from SAMs over North Vietnam convinced planners that the best defense for the manned bomber was to avoid detection in the first place.  Low altitude terrain masking, electronic warfare, passive low observable design features and stand off launched weapons like cruise missiles were the preferred protection for manned bombers in the '70s and into the '80.  

Just what the future defensive systems for manned bombers remains a bit of a mystery.  Both the USAF and Northrop Grumman aren't making many public comments about the new B-21 bomber under development, but it appears likely that stealth combined with a the latest net-centric warfare capabilities will be the cornerstones of its design.  Whether this bomber will carry AAMs is unknown.