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.
Not to mention ecological. I mean, in Poland, I can't find any sensible source of distilled water other than buying 5L plastic bottles of it. I've briefly looked into devices that could make distilled water, but all that I've found was some industrial-grade hardware that costs more than reasonable for personal use.
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.