It's the same with every other browser, for instance...
https://support.mozilla.org/en-US/kb/password-manager-rememb...
https://support.mozilla.org/en-US/kb/password-manager-rememb...
As far as I'm aware, Safari pulls the passwords from the keychain when necessary and does not provide plaintext access to them from inside the app.