It doesn’t.
The cubes are not perfectly smooth. They have dents and unevenness in the surface that prevent them from coming into close contact and fully bonding the way the atoms inside the material are bonded. (They also trap air molecules between them if this contact isn’t taking place in high vacuum.)
If the materials are perfectly smooth, brought into contact in a vacuum, and left there for a bit, they can indeed merge into a single object. It’s called [cold welding](https://en.wikipedia.org/wiki/Cold_welding), and it occurs precisely *because* the atoms don’t know “which piece” they’re a part of.
Latest Answers