What a hash is for
A cryptographic hash maps any input to a fixed-length value such that the same input always produces the same output, a different input almost certainly produces a different output, and the output cannot be reversed. That makes hashes useful for verifying that a file arrived intact, for detecting whether something changed, and as a building block inside signature and authentication schemes.
Why SHA-1 is here but marked broken
SHA-1 has been considered cryptographically broken since 2017, when a practical collision was demonstrated — two different inputs producing the same hash. It must not be used for security. It is offered here because Git object IDs, older checksums and some legacy protocols still use it, and matching an existing value is a legitimate need.
Why there is no MD5
MD5 has been collision-broken since 2004 and the Web Crypto API does not implement it. Adding a third-party library to provide it would mean shipping extra code specifically to offer a hash that should not be used — so the tool does not.
Hashing is not password storage
A plain SHA-256 of a password is fast to compute, which is exactly what makes it a poor password hash — an attacker with the hash can try billions of guesses per second on commodity hardware. Password storage needs a deliberately slow, salted algorithm designed for the job: bcrypt, scrypt or Argon2.