Was cost the only reason? Does anyone have any sources for why they made the design decisions that they did?
This probably isn't the best place to ask about computing history. You might want to try a more technically minded sub
The Motorola 6800 had a DIP16 design and a DIP40 design.
In 1973 complexity, size, signal, power, and cost, were major problems. The 8080 could sell for a few dollars.
The 8080 was based off of the 8008, which was also a 40 pin design.
Qualitative remarks: Microcomputers were very new and the 8080 was a large step forward in making them accessible. Intel was great at fab-ing things and getting them to market, not necessarily at giving the consumer the most elegant design or architecture. If you are specifically interested in how the chip was designed, you should get in touch with the Computer History Museum Since they are a hop skip and a jump from Intel and are a glorious font of information about the early days in the Silicon Valley.