You could say the same about a car engine. In practice, engines are optimised for a series of modes. A jet needs high power for at-the-limit take-off which determines things like max payload, range, runway length. Here the forward speed is low and the ambient temperature high. It also needs to deliver (less) thrust at altitude where speed is high and temperatures very low. For any given set of conditions there is an optimum something or other (eg SFC) but I guess the design is a compromise mapped onto typical flight profiles. As regards general rules - higher compression gives better efficiency, as does higher engine temperature. The lower the ambient temperature, the better for a jet.