The Find My Device app requires your Gmail password because app is itself tied to your online Google account. The app isn't just connected to your Google account, it won't function without that link. The first time you started up your phone, part of the setup process involved entering your Google account info. That linked the phone to your online Google account. The Find My Device app is developed and maintained by Google, and without that link between your phone and your Google account, you wouldn't be able to use the Find My Device service to remotely track your phone.