The database never stores your actual password. It stores a hash — a one-way transformation that turns your password into a long, random-looking string.
mypassword123.$2a$12$LJ3m4....If someone steals the database, they get every user's password — and many people reuse passwords across websites. With hashing, the attacker gets hashes, which are extremely hard to reverse back into passwords.
Regular hash functions (like SHA-256) are fast — too fast. An attacker can try billions of guesses per second. Bcrypt is deliberately slow: it takes about 250 milliseconds to hash one password. That's imperceptible to a user logging in, but it means an attacker can only try a few guesses per second instead of billions.