Please explain how often is "quite often". I'd like a number in minutes or hours. It doesn't need to be precise, but I can't tell whether "quite often" means "every 2 minutes" or "twice a day". The former sounds like a bug. The latter sounds reasonable.
Browser cookies associated with many account logins typically
expire after some period of time. This is a sensible security measure, so if you forget to logout, the cookies granting access to the account will eventually expire on their own, rather than remaining valid forever. This applies to online email accounts, Amazon accounts, and many others.
The expiration time of browser cookies is set by the server. That would be the gmail server in this case.