To check the
sudo password, we need root permission to even read the
/etc/shadow file. But how
sudo checks password?
Since the other answer is just wrong:
sudo is owned by root and has the setuid bit set, which means it runs as its owner (root) rather than as whoever launched it. This allows it to verify your password hash against /etc/shadow (or any other authentication provider). This also lets it read /etc/sudoers, which is only readable by root.