HTTP/1.0 added status codes to HTTP/0.9, the initially released version. The status code range is defined as such:
The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request[...]. The Status-Code is intended for use by automata[...].
The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:
- 1xx: Informational - Not used, but reserved for future use
- 2xx: Success - The action was successfully received, understood, and accepted.
- 3xx: Redirection - Further action must be taken in order to complete the request
- 4xx: Client Error - The request contains bad syntax or cannot be fulfilled
- 5xx: Server Error - The server failed to fulfill an apparently valid request
As for the "why": it allows for five categories, each of which can contain a hundred different codes (x00 - x99), which "ought to be enough for anybody".