When two blocks of ice are pressed, work is done on them. The volume must decrease and temperature must increase. And therefore ice melts. So there is water on the boundary of the blocks. When ther pressure is removed, the water between the blocks transform to ice again. Since there is no separating boundary between the two blocks, the blocks combine in a single piece with the freezing of water between them.