This question is asking a bunch of things, I will try to sort things out.
Hash functions were around long before SHA-0. The popular hash before SHA-1 was MD5 which shares a lot with SHA0–2 but there were many others.
The SHA family were designed as part of a project trying to supply a full set of standardized cryptographic tools providing 80-bit security: the Capstone project.
They published SHA (now named SHA-0) and immieiatly retracted it due to a serious flaw and published SHA-1 instead. As computers grew stronger and cryptanalysis better,we needed a stronger hash functions. 80 bits of security doesn't seem all that great, so without being too creative the SHA2 family came out. This is essentially a supersized SHA-1.
Fast forward a few years, SHA-1 is still the most popular hash function, serious weaknesses emerge and computers keep getting faster. The Merkle-Damgård construction also loses favor following attacks on the construction itself.
Following the success of the AES competion, the SHA-3 competition is launched, and eventually the SHA-3 algorithm is standardized using a very different sponge construction and is hoped to remain secure for many years.
Key derivation functions are not the same as hash functions, and password-based key derivation functions are not the same as general-purpose key derivation functions. Password-based key derivation functions are very similar to password-based hashing functions. Using something like PBKDF2 we can convert a general-purpose hash function to a password hashing function. One should NOT use a general-purpose hash function as is to hash passwords, for the simple reason general purpose hash functions (such as SHA*) are way too fast, and password-based KDF or hashing are required to be slow.
Early hash functions were used for message digest, not sure exactly what came when. MD2 is from 1989, I'm not sure what came before it.
For password hashing, the earliest I know is Unix crypt based on the DES cipher from 1973. You can look at as a hash function, but it didn't do compression: it was 56 bits and 64 bits out.