Car batteries really don't take being "deep cycled" very well. The battery doesn't discharge all that much when starting the car (think a few percent). What you did by leaving the car in accessory mode likely discharged it much more. On an old car battery, this can be terminal. Even brand new car batteries don't really handle this all that well, which is why "deep cycle" batteries exist.
My battery died during the pandemic, probably due to the car sitting for months unused. I hooked it to a battery charger/tender and charged it, but it wouldn't hold a charge for more than a couple days. When I took it to the store, the AutoZone tester said it was fine. As was mentioned previously, Mazda's can do weird things when the battery is on its way out. My dashboard was lit up like a Christmas tree. I ended up buying a battery at Walmart, swapped it in, and all was well.
Personally, if the battery is more than a couple years old, I'd just go buy a battery at Walmart and see if it fixes your issues before swapping alternators. The warranty on the current battery is probably pro-rated so you really aren't getting a free battery anyway and at some point your time is more valuable.