Why were the smokestacks on old time steam locomotives funnel-shaped?

We’ve all seen photos of Civil War-era steam locomotives. They have these huge funnel-shaped smokestacks. It wasn’t always like that. Early, early steam locomotives had straight-pipe smokestacks. Why did they change to the cone-shaped design?

Spark arrestors, I think. I’m just guessing until someone more qualified comes along.

The conical design is the Radley-Hunter centrifugal spark arrester that was used on wood fuel locomotives. Coal fired locomotives used a straight stack.