A device driver creates a layer of abstraction between the hardware and the operating system. They were created by programmers who wanted a standard set of system calls in interact with hardware.
Device drivers were 'invented' when x86 CPU's added the capability to enter 32 bit protected mode. By changing to this mode, the CPU changed how it addressed memory, therefore breaking the 16 bit BIOS system calls. Device drivers are the replacements for the functions provided by the BIOS.