This is because it works that way. It was designed that way. But I think your question is about why.
Remember that Swing first appeared almost 15 years ago. One criticism was that the API was slow (the fact was, it was slow because people really didn't understand how to use it, but that's a different story), so the API had to be designed with performance in mind.
There are a number of factors ...
Swing uses a passive paint process, which means that requests for paint are sent to the drawing subsystem and schedule (back to EDT) for processing. The paint subsystem decides what, when and how much should be painted. This is done by desecrating the paint subsystem.
This means that you never know when a drawing cycle can be completed, so we need to somehow respond to these requests.
Versatility is another factor. The API is abstract enough that it doesn't matter (a lot) where the component is painted. That is, you can be painted on a screen, printer, or even an image. This means that you don’t need to repeat a lot of paint code to work on different devices.
You also never know when a component will become visible (i.e. when it will be bound to its own peer). This means that the graphics context may be null , so having “helper” methods can cause more problems. When paintComponent is called, you (basically) guarantee that you have a valid graphics context for your drawing.
Extensibility would be another factor. Not only is it very easy to override paintComponent to change the way some components are painted, it is also possible for the paint system to provide an extended graphics context, just like the current case. When paintComponent is invoked (at least by the paint subsystem), it ensures that the Graphics context is an instance of Graphics2D , which is an extension to Graphics , providing a number of important improvements to the API.
All this is done without the need to change the base class that people use, so if they do not want to use these functions, they remain untouched by them.
You may need to read ...
More details ...
And remember that "Painting is fun";)
Additional thoughts
One of the other considerations to consider is the fact that the Graphics API is central to drawing, not just considering the user interface, but also printing and image processing. The API is disconnected from the target, which provides more flexibility, but also generality.
This means that if you need to print to a printer or display on an image, you can use the same API as for drawing on the screen.