The getopts utility does not know about mandatory options, only about what options are allowed (and what options out of these should take an option argument). If you want to enforce mandatory options, you would have to do so with your own tests in or after the option parsing loop.
The getopts utility does not do this because options can have more complex relationships such as some options conflicting, some options requiring the precensepresence of other options etc. This is left to to the script author to sort out with their own logic.