I have a 2014 Honda. I bought the battery 2 years ago from the dealer.?

Last night I went to start it and it made the machine gun sound, got a neighbor to jump me and it worked fine. This morning it also started first try, So, WHat happened last night and will it happen again? Do I need to take action so I won't get stranded?
6 answers 6