It's because they can, and in the end they are the ones who profit from not doing it.
It's kind of the same reason why companies ask you how much salary you want in job interviews: they want to get away with paying you as little as possible, and they get that chance by asking you first, instead of you asking them.
If they give a range, i.e. x ... n, then they'll never get away with paying anyone x-1 salary, but someone might ask for x-1 or less once asked, but that's never going to happen if they tell you upfront that they'll pay at least x.
Also, people would not feel good accepting a very low number in the range, knowing that the company was actually ready to give a greater amount to someone else.
Note that some companies do post a range, but it's rare. They probably have higher standards (just maybe) so that they'll not feel bad about paying you at least the lowest number in the range since you qualify.
Also, magnitude is a key here. If a company were to hire 1000 employees in one day, with only a small amount of people taking care of the hiring process, then they'd be forced to throw out a number which people would simply have to accept or deny. But when a lot of time is giving to hire a few individuals the company can afford to take things slowly and try to get away with paying as little as possible.