Because of friction present in machine, some of the power ( usually very little) is lost during transmission. Output work is always less than the input work. Since efficiency is the percentage ratio of output work by input work, it is always less than 100%
A machine cannot be 100% efficient because the power transmission in the system is used completely leaving very little power from the energy produced. Another reason is that the input power does not equal the output power.
Energy is lost through the mechanics, the most common being loss due to friction. For example, if you put your bike upside down and spun the wheel, eventually the wheel would have to stop because it loses energy through friction.