TLS uses a public and private key to encrypt a session. The clients have only the certificate containing the public key, but in order to use it, the server contains the private key. Outside the server, this communication is safe. Inside the server, an attacker could learn the key and decrypt the communications.
If we use public/private key encryption to encrypt a password and an attacker gets onto the server, they can learn the private key, then decrypt all the passwords.
Hashing has no key (although it may use "salt".) It is often called a one-way function, so unlike encryption it has no "reverse" algorithm. If you hash data you can't easily un-hash it. You can still brute-force attack a hash by trying every password you can think of, and if the hashes match, you've guessed it. But there is no magic value that will recover all the passwords. That's why hashing stores passwords more securely than encryption.
Regarding flaws in MD5, SHA-1, etc., remember that there are several uses for cryptographic hash functions, and that the vulnerabilities each exposes differs by use case. One use for a hash is to generate a message digest, which is a unique number that helps validate a piece of text is unchanged (such as the data contained on a certificate.) If a second document can be forged with the same digest value, then an attacker could create a false certificate and perform a man-in-the-middle attack on all users of the server. But if a collision is found between two passwords in a database, it risks leaking only the information that both Ulkoma and JohnDeters chose the same password. That carries risk to only two people instead of every user of the system, which is overall a less severe problem.
The proposal to generate a unique public key for each user (discarding the private key), then encrypt and store the password, results in a system functionally equivalent to using a salted hash. The attacker doesn't have to crack the public key, they just have to try encrypting a bunch of passwords with the public key until they get a match.