why is machinery not 100% efficient

Friction, heat loss