The username-password flow is only intended for development. It is insecure and should never be used for a production application. As this help topic helpfully warns:
This OAuth authentication flow involves passing the user’s credentials back and forth. Use this authentication flow only when necessary. No refresh token will be issued.
Note that you do not get a refresh token, meaning once your current access tokens expire, you have to ask the user for their credentials again, or store the credentials locally, which is definitely not a good idea in case the storage is compromised.
If you want apps that can persist a session beyond a short time window, and you want to mitigate the damage that can be caused if the device is compromised or stolen, use another flow, such as the client flow or web server flow.
Using this flow during development means you don't have to engineer an entire OAuth2 flow, which can involve setting up a WebView or other browser container; this flow can allow you to log in using just a few lines of code, which is perfect for development purposes.
If you use the username-password flow, that means a compromised device means the user has to reset their password and potentially update that change in numerous places, while a compromised device using the client flow can simply be deactivated with no further interruption to the user's other sessions.