Because said machines have to operate in the physical world with constraints caused by the laws of physics. It’s not possible to do useful work without encountering some of these issues. The mains ones are:
- Heat lost from the system
- Friction (including air resistance)
- Electrical resistance