Java has two kinds of exceptions: checked and unchecked exceptions. According to the specification, java.lang.RuntimeException and all other exceptions that are subclasses of RuntimeException are unchecked; all other exceptions are checked.
That's just how it is defined and there's no asking "why".
If your question is really: "Why do we have a distinction between checked and unchecked exceptions in Java?": In software, there are generally two kinds of errors that can happen while a program is running: expected errors and unexpected errors.
An expected error is something that the programmer can expect to go wrong sometimes. An example of this is a network connection error. The computer might not be connected to the network when the program runs, and the program should handle such an error nicely, for example by showing an error message to the user.
An unexpected error happens when something goes wrong in the program unexpectedly, and it is almost always an indication that there's a bug in the program. As the programmer, you can't do much about that while the program is running - all you can do is debug the program afterwards and fix the error in your code.
Java checked and unchecked exceptions roughly compare to expected and unexpected errors. You are supposed to handle checked exceptions, and that's why the compiler checks if you handle them properly.
When you write your own exception classes,
you should think about whether your exception represents an expected error or an unexpected error and subclass Exception or RuntimeException accordingly.