What could be the reason for 2004 Honda Civic car battery to die after 2 or 3 years?

The battery is worn out and needs ot be replaced depending on the mth warratny it has or the alternator is going out and is draining the battery . A simple check may be the battery cable . take the positive battery cable off while running as well if it dies it's the alternator .