Hairsprays have aerosol delivered chemicals, some which are glues to hold hair in place. Since most chemicals have not been tested for their safety in relation to human health and whether they are carcinogenic or not, it is reasonable to assume that breathing in hairspray is not a fantastic thing to do for one's health.
Upon its initial debut, hairsprays used some type of chlorofluorocarbon (CFC) as a pressurized solvent, which seemed okay at the time. It was discovered at some point, however, that CFCs were causing destruction of the ozone layer, which shields us from harmful incoming solar radiation. Since then, most hairspray solvents have switched to a more environment-friendly solvent.