The actual answer is basic engineering. It is a lot easier to optimize a system if you can separate it into subsystems that can be independently optimized.
By optimizing one side for the connectivity, and the other side for heat removal. You have simplified the problem, while imposing, at most, a 2:1 penalty to either problem. Clearly, if you had much more heat than connections, or more connections than heat, this choice should be revisited, but that clearly is not the case.
This does not mean that it is not possible to remove heat from the underside, or to place connections on top, but at what cost? What other compromises must then be made?
Liquid-cooled cpu modules, while they are making a comeback, were rather common 30 yrs ago. When mainframes had cpu “envelopes” that were fully liquid-immersed, and thus removed heat from all sides of the enclosed ICs. This clearly presents a downside to the design of the connections, debugging, rework, and the types of liquid that can be used. Those are a lot of additional constraints to either subsystem. The fact that such choice was made, indicates that heat removal was the primary constraint.
Modern liquid-cooled supercomputers, have highly-optimized water micro-conduits on top of the wafer. While all of the connections are on the underside. Each subsystem is independent of the other, greatly optimizing the whole design.
In applications where the side opposite the connections is otherwise occupied, e.g., LEDs, lasers, optical links, RF ports, etc. the underside is the primary heat-removal path. And specialized substrates, with high heat conductivity, are generally used.