Why is there a JDBC driver in java?

The JDBC exists so that you can change the underlying driver with just a change of a String, and still be able to execute the same statements on a different type of database. In summary, it was made so that you don't have to redesign your entire application to change database types.