It's not the same thing at all. TeamViewer literally has to take in the password and paste it plaintext in later. They cannot simply validate that a user knows the password.
This does not happen "all the time" in web dev.
I’ve actually seen that functionality in the wild. Quite horrible. IIRC it was some weird open source web app.