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:
They published SHA (now named SHA-0) and immidiatly retracted it due to a serious flaw and published SHA-1 instead. As computers grew stronger and cryptanalsis better,we needed a stronger hash functions. 80 bits of security doesn't seem all the 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-Damgard constuction also looses favor following attacks on the construction itslef.
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 though using something like PBKDF2 we can convert a general purpose hash function to a KDF one should NOT use a general purpose hash function as KDF as is, for the simple reason general purpose hash functions (such as SHA*) are way too fast, and KDF are required to be slow.
Early hash functions were used for message digest, not sure exactly what came when. MD2 is from 1989 not sure what came before it.
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.