sudo vs su (as non-root user)

This is expected behaviour.

  • The purpose of su is to switch user. It's called the substitute user identity tool. su takes the other user's password since you are switching to that user.

    The su utility requests appropriate user credentials via PAM and switches to that user ID (the default user is the superuser). A shell is then executed.

    Source: Man page

  • The purpose of sudo is to execute a command as another user. The -u or --user option for sudo specifies that user. You're not logging in as that user, just running a command. sudo takes your password to verify your identity for performing such a task.