Servlet can access the ServletConfig, the ServletConfig provides access to the ServletContext. It's all to do with the intent of each interface. The Servlet interface
Defines methods that all servlets must implement, the The ServletConfig interface (is)
used by a servlet container to pass information to a servlet during initialization.
If you check the API description for GenericServlet it states:
This method is supplied for convenience. It gets the context from the servlet's ServletConfig object.