Q = I came to use my Calcium chloride, which has been stored on the shelf unopened, and the contents have solidified. The chemical must be faulty.
A = Calcium chloride is hygroscopic and can readily absorb moisture from the atmosphere. So, even though the bottle was unopened, water vapour in the air can still ingress the contents of the bottle. Hygroscopic chemicals should be stored in tightly closed containers in dry conditions or in a desiccator, to prevent moisture absorption which can lead to congealing or solidifying of powders, granules and crystalline solids.