The reason is simply that there are 24 ways to orient a cube. This can be expressed in many ways - 6*4, 8*3, 12*2. There are 6 centers with 4 orientations each because there are 4 different cube orientations which put each center on top. There are 8 corners with 3 orientations each because every orientation of the cube puts a different sticker on the top side of the URF corners (so 8*3 = 24 possibilities), and there are 12 edges with 2 orientations each because every orientation of the cube puts a different sticker on the top side of the UF edge (so 12*2 = 24 possibilities). There always have to be 24 possibilities because of the 24 different orientations of the cube.
There are similar numbers for other shapes of puzzle, too. You can orient a tetrahedron (Pyraminx, for example) in 12 ways, an octahedron in 24 ways, and an icosahedron or dodecahedron (Megaminx) in 60 ways. Puzzles like the Square-1 and Domino have only 8 orientations because the top side must always be on the top or bottom, but the same thing applies - the square-1 has 8 corners with 1 orientation each.