When you say you got a replacement, what do you mean? A new battery or just another old battery?
As for it not holding charge, it could be several things. Could be a bad alternator, damaged battery casing, or a bad battery cable connection. It could be Earth leakage (leakage from an active circuit to ground)
If it's a newer vehicle, the key-off load could be draining it (lights remaining on, computer modules that won't shut off, etc.) or as lotus mentioned, the battery could just be past its prime.....when a car battery loses charge several times it eventually loses its ability to recover from the low voltage condition.