When bleaching powder is exposed to air it reacts with Carbon dioxide present in the air to produce Calcium carbonate and Chlorine gas.
CaOCl2 + CO2 → CaCO3 + Cl2 ↑
So over time the bleaching powder gets detoriated by reacting with air over long exposure.