Yes. That is, for example, how Firefox stores passwords (if you enable the master password option).
I imagine they haven't bothered to do this for usability reasons, since people would have to type in the password every time they start up the app. Adding it as an option certainly couldn't hurt, but even then I'm not sure there's a point. Most people leave their phones on most of the time, and WhatsApp is probably going to be running in memory that whole time, in which case someone who steals your phone will still probably be able to read all your chat logs anyway.
I imagine they haven't bothered to do this for usability reasons, since people would have to type in the password every time they start up the app. Adding it as an option certainly couldn't hurt, but even then I'm not sure there's a point. Most people leave their phones on most of the time, and WhatsApp is probably going to be running in memory that whole time, in which case someone who steals your phone will still probably be able to read all your chat logs anyway.