Why do people say that smallpox has been eradicated?
The viruses that caused smallpox (Variola major and Variola minor) are generally not stable in the environment (&lt;24 hours as an aerosol), though they may persist for more than a decade within scabs Reviewed: Sinclair et. al., 2008 OSHA.

UV light is an excellent disinfectant, so typically any virus exposed to sunlight will lose rapidly infectiousness.

You may also find this answer to a related question of interest:
https://biology.stackexchange.com/a/59165/46609