This is because it is not possible to convert the entire heat input to work output, a portion of the heat has to be rejected to a sink (Second Law of Thermodynamics). In actual engines the efficiency is even less due to frictional losses, burning characteristics, etc.