Gravity would pull the points of the cube (squares have only two dimensions) down, this would make a sphere. To meet the definition of a planet, they have to be massive enough to become spherical. Small asteroids and moons (like Mars's) are not massive enough to do that. Therefore they are not planets.