The battery works when the car is connected to the battery, electrons are allowed to flow. 3 things in bat. There are 2 connectors that go out of the battery. These are called the cathode and anode. There is also a solution that the cathode and anode sit in (Battery Acid). When used a chemical reaction occurs between the acid and the anode (positive terminal) which releases electrons that flow through the circuit. These reenter the battery through the cathode (negative terminal) where another chemical reaction is happening between the cathode and solution. The electrons are incorporated in the products of this reaction.
in car batts the cathode is lead dioxide (PbO2), the anode is a sponge of lead (Pb), and the solution is sulfuric acid (H2SO4). When the battery is being used, the 2 connections react to form lead sulfate (PbSO4) by reacting with the sulfuric acid.
When a battery dies, it is because one or more of the chemical reactants is more or less used up or is lost somehow due to leaks or other loss.
if its not connected, there is no way for electrons to be made to keep battery alive.
also there can be sulfation that can occur on the plates which slows or stops the reaction. creates a build up on plates
yes if the battery was made so poorly with bad material, the plates may warp or touch due to shock? which would short the battery i believe. but usually there are 6 seperate cells so chances of that happening arent great, i would think