Why did the NSA create SHA?
The NSA created SHA (quickly replaced by SHA-1 to fix a security issue that remained unpublished for years) because they/the US government needed a 160-bit hash function, so that it has 80-bit security against collision-resistance, in particular towards use in the DSA signature system of FIPS&nbsp;140.

In this usage, a hash functions condenses a possibly large piece of information $m$ (e.g. a 10MB file) into a smaller, easier to manipulate piece of information $h=H(m)$ (20 bytes for SHA-1), wich is what really gets signed. The hash must be collision-resistant, so that an adversary can't come with two distinct messages $m$ and $m'$ with $H(m)=H(m')$, which would allow the adversary to obtain a signature for $m$ from a legitimate signer, and pass it as the signature for $m'$.

SHA-1 uses principles similar to the earlier 128-bit MD5, but with a more regular design. Also it is big-endian, likely because that's customary (to the point of being unstated) in NIST crypto standards including DES/FIPS&nbsp;43.