Although it seems like trivial that developers should hash the credentials before saving to a database, I can't understand why is this needed.
Passwords were invented to keep some users from seeing some private data, which belongs to someone else. For example, chat applications make use of passwords to only let aithenticated users see and send messages.
Say one such application holds the passwords in plain text. If a hacker gets access to the database, they will be able to both see the data, and change it.
Now say that the passwords are held hashed. This should not change anything, since if the attacker gets access to the database, even though they cant see the actual passwords, they should be able to both see the data, and again, change it.
With these lines of reasoning, one can argue that, the second case is more advantageous when attackers can only see the data, and not change it. But, if the attackers can both see and change the data, then hashing would be useless.
What is the rationale behind hashing then?