I’m going over a chapter on linear momentum in my physics course right now and am somewhat puzzled about what happens with some of the kinetic energy that is lost in a perfectly inelastic collision.

Imagine a world without sound, heat, or any non-mechanical forms of energy. Now imagine that there are two perfectly square blocks, $M_1$ and $M_2$, in empty space that each have a mass of $1$ kilogram. $M_1$ flies toward $M_2$ in a perfectly straight line with a velocity of $1$ meter per second. 
$M_1$ sticks to $M_2$, creating $M_3$, and the new $2$ kilogram rectangular block moves with a velocity of $1/2$ meters per second. 

In the collision, $1/4\,\mbox{J}$ of energy was lost. What happened to that energy? Does it require a certain amount of energy to form a single $2$ kilogram object out of two $1$ kilogram objects?

I would appreciate any insights. If you have any material that I could read or watch that you think addresses some flaw in my thinking, please let me know.