The <random> header was only added to the c++ standard in C++0x. The standard library implementers put in a preprocessor directive to error out if you try to use <random> in C++98 mode, for one of two reasons:
If the header file takes advantage of new C++0x language features, it wouldn't work at all in the default C++98 mode. The C++0x error message is there so that you'd understand why it didn't work, rather than having to figure out the meaning of soup of "unknown keyword" and other error messages.
If the header file doesn't require any new C++0x language features, then the C++0x error message is there, so that you wouldn't accidentally use it thinking it was available in C++98. If you were to do that, and then somebody else tried to compile your code on a C++98-only compiler that didn't ship the <random> header at all (e.g. an older version of GCC that you intended to support by restricting yourself to C++98), they'd be quite mad.