According to Hund's rule, electron orbitals are most stable when they are fully filled or half filled. So the most stable configuration for the 3d subshell is 3d10 or 3d5. In the case of chromium, after the 4s2 3d4 configuration is attained, an electron from the 4s orbital jumps to 3d subshell because 3d5 is a much more stable configuration than 3d4. That's why final configuration for chromium is 4s1 3d5. This is possible because of the fact that the two energy levels being considered here are very close and the electron shift is easy. In case of other elements in the period, it goes against the Aufbau rule and with other elements in the group, the energy difference between ns and (n-1)d orbitals increases and so that transition is not easily possible.