It *is* as simple as that.
A given engine has a maximum efficiency at a specific RPM and torque yielding a specific output power. The transmission has a number of fixed impedance matching ratios. Between these two engineered characteristics and the aerodynamics which cause loss proportional to the square of the speed, there will be one point for maximum MPG although it is really more of a broad lopsided hump falling off faster on the high side because of the square characteristic of drag loss.
If you change your transmission to a different gear, then that point will move. Continuously variable transmissions including hybrid electric ones turn the separate peaks into another continuous curve.
Electric motors have much broader efficiency curves broadening the miles per energy curve and making the drag curve more significant. The fact that an ICE powered car has a better MPG at a higher speed is a reflection of the poor efficiency of the ICE at low output power levels. As you point out, the ICE has to be sized for good performance at the expense of low power efficiency.