No useful purpose? When I was a kid you could buy it at the corner store. Mixed with sugar it made a nice pyro display.
I think you are referring to potassium nitrate (or the less reactive sodium nitrate). My friend’s father was a pharmacist. We got it for 27 cents a pound back in the ‘60s IIRC.