Why is the mechanical energy lost whenever an object undergoes plastic deformation? I have read here that "Mechanical energy is lost whenever an object undergoes plastic deformation." 
Why is that? I mean the object would be changing its shape, and while it's changing its shape it will move a little (kinetic) but also this movement will contribute to a change in its shape (potential?). Why doesn't the mechanical energy stay conserved?
 A: Work is done, but the deformation is not elastic, so no potential energy is stored. And there is no kinetic energy either. The internal friction converts mechanical energy to heat and the temperature goes up. This is used in FSW (Friction Stir Welding).
Bend a paperclip and hold it against your lip. (Be careful, might hurt.)
A: When there is a non elastic deformation of a system the work done on/by the system can increase the elastic potential energy of the system, can result in permanent deformation of the system (break bonds), can heat the system (increase its temperature) and generate sound (and light).
When a ball, which has got kinetic energy , hits a wall then some of the kinetic energy is temporarily converted into elastic potential energy which then is converted into the kinetic energy of the ball on rebound.
Here you have an interchange of mechanical energy of different types.
At the same time the ball/wall might suffer permanent deformation, heat up and sound might be produce all representing a decrease in the amount of mechanical energy the system compared with what the system initially possessed.    
The text that you quote defines plastic deformation as happening when no elastic potential energy is stored and so any mechanical energy the system had is lost ie converted to the other forms which I have described above.
Squashing a piece of BluTac which then does not go back to its original shape when you stop squashing and it is a good example of plastic deformation.
On the other hand compressing and releasing a squash ball is an example where some of the mechanical energy is converted to heat and is the reason why squash players have a few rallies before starting a game.
Compressing a spring and then releasing it will result in the spring returning to its original shape and size is an example of electric deformation.  
This question is related to yours.
