While in the universe of possibilities batteries can randomly die,...it usually is a slow progression. I tested my GFs battery after changing her oil. I test it after each oil change, it always cranks fine, but this test showed it was weaker and "replace". Like I said, it cranked fast and fine. But if I left it in service it would probably die...could be a few weeks, could be a few months. I replaced it that day.
This is where owning an inexpensive battery tester is worth its weight in gold. Instead of guessing when it should be replaced, or using some arbitrary number of years, just test and know for certain.