An engine relies on the fact that heat is transferred naturally from a higher-temperature region to a lower-temperature region. Even devices designed to cool, such as refrigerators and air conditioners, rely on this principle.
Heat is not transferred naturally in the other direction.