I think it sends a back signal and will put a slight negative mark on the interviewers' memories of that interview. Asking at the end of the interview shows that you care about other things, too.
You can argue that it shouldn't, but people are people.
I find it really bothers some companies while others are proud of their salary ranges and will gladly share upfront.
The ones who get offended usually pay less and have had issues with employees quiting over low salaries and/or have heard negative candidate feedback around pay