The same general reason, they are very complicated and need to work perfectly for many years with a lot of challenging constraints. First off they need 2 of them to create coin flip risk for attackers. Then they need to be adapted for mid air refueling so that they can stay airborne indefinitely in the event of nuclear war. Speaking of Nukes all the systems need to be hardened against EMP. The climate control system is probably equipped to filter out any biological or chemical agents. All or parts of the aircraft are probably armored to mitigate small arms fire. The planes keep a Nasa Apollo capsule in their belly so that the president can jettison from the plane in the event that is necessary, that's probably a pain in the a* to install. The whole aircraft is probably setup to mitigate surveillance attacks with things like windows that deliberate vibrate to thwart laser based audio eavesdropping. Then each plane needs to host a few dozen staff and reporters who accompany the president. Then also the 747's travel with cargo planes and/or Ospreys also made by boeing to transport the armored limos and/or helicopters. All or some of those support aircraft might be included in the price. Probably a bunch of other classified stuff I haven't thought of. Still outrageous but I can kinda see why it adds up to billions.