Maybe if you expect the heat pump to mainly move heat in, the heat generating parts should be on the inside, and reverse if you’re mainly moving heat out (A/C).
Don’t know if this is considered during installation?
The compressor is the only component that generates a substantial amount of heat. That's really it's purpose: trading a pressure increase in the refigerant for a rise in temp.
The compressor is usually in the outdoor unit, because of noise, size, and proximity to the controls. It also is the item that consumes most of the power, so for minisplits, the outdoor unit is the part wired for high currents. It usually is wrapped in a nice insulating blanket (for sound as well), and vapor injection techniques used in cold climate pumps means the heat wasted is minimal.
Don’t know if this is considered during installation?