Holding the SHIFT-key enables you to set values to things that are normally limited (negative values / very high values / 0).
For example, the normal max hero level is 10000 (in gameplay constants). With SHIFT, however, you can set it to something higher.
The reason why you have to hold SHIFT is because you might mess stuff up: iif some values are too high, they might crash the game or cause lag. Same goes for negative values.
While the max hero level can be set to something higher than 10000 while holding SHIFT, in-game it will cause a lot of problems (I believe this has to do with the experience-integer not being able to handle such huge numbers).
It's a safety measurement. As long as you know what you're doing, it's okay.