In the context of mechanical engineering, describe the thermodynamic principles that govern the operation of heat engines, including the Carnot cycle, and discuss the implications of these principles on the efficiency limits of real-world mechanical systems.