It often happens, especially if your keyboard is sensitive or you type fast. When the overwrite mode turns on, it usually means you’ve accidentally pressed the Insert key on your keyboard.
It doesn’t get activated automatically, there’s a key that activates it. The overwrite mode is irritating, but it’s not that mysterious at all.