It's not just salt though. In some countries, the tap water isn't safe to drink, so it's probably not safe to breathe.
Also, as another poster pointed out, humidifying a large room in winter requires several liters of water per day. The cost of distilled water would quickly dwarf the cost of the humidifier itself, so other types of humidifiers besides ultrasonic (namely evaporative ones, where the main danger is mold, which distilled water doesn't help you with) are more economical.