Because they are designed to be this way, and because of this, they posess a complex chemical reaction which can be reverted by reverse current (entering the battery, not going out). Those are the cases of: Ni-Cd, NiMH, Li-Ion, Li-Polymer, Lead-Acid, among some others.
On the other hand Alkaline Batteries (those not-rechargeable) as well as mercury, carbon-zinc, copper-zinc, and even nuclear batteries (those on peacemakers) They posesse a chemical reaction, which is capable of producing the voltage, but the current produces a chemical reaction which cannot be reversed by applying the current agin, in backorder, so they are slowly destroyed/transformed by normal use, until it’s dead; thus, being non-rechargeable by nature.