Funny thing is that the 747 was originally designed as an airframe that could convert to a freighter. That's why the cockpit is in a bubble above the main cylinder of the fuselage--to get out of the way of the cargo.
Back then, the conventional wisdom was that eventually all passenger travel would be supersonic. Boeing put their best folks on the SST project, and the 747 was a stopgap afterthought.
Turned out that fuel efficiency was way more important than speed.