Why it works after being started but still won't charge I don't know. That's how my truck was as well. My alternator wasn't fully dead so I'd be able to drive it for a bit but even turning it off for a few minutes it wouldn't restart. I replaced the alternator and not the battery and I haven't had a problem since.