Sometimes a battery can fail due to structural failure or compromise of the 6 internal cells, which are made from plastic (so that they don't interfere with the chemistry of the lead acid battery). It is possible that is what happened to your battery, due to vibration and heat from the engine or ambient temperature. The battery could have been damaged or weakened even before it got put in the car.
Hopefully, that is the problem, otherwise you may have an electrical short somewhere that is hard to find.