Glassdoor isn't a magical truth ball, it depends on 1) random users putting in info, and 2) putting in correct info.
For issue 1) you have a selection bias, and for issue 2) you have no way of knowing if that salary is for a hotshot with a great resume, 6+ years old and out of date, or anything else has changed within the company or field. And in a lot of cases the ranges are crazy large, almost uselessly so.
With a number in the actual job ad you know exactly where you're at: "SWE 2 @ 120k + 20% bonus + misc."
Glassdoor/others are good for ballpark ranges which is good enough for me. If you want to know ahead of time, there are some employers who opt into that. IMO the value brought by a human being is complex and they deserve a chance to argue their worth, so there is no sense in advertising a price point that may vary. We are all primarily competing against ourselves in a sense, and allowing wiggle room on compensation lets employers and employees make better connections.
If you don't want that, go to a union, work for a government, or do something with an hourly wage.
For issue 1) you have a selection bias, and for issue 2) you have no way of knowing if that salary is for a hotshot with a great resume, 6+ years old and out of date, or anything else has changed within the company or field. And in a lot of cases the ranges are crazy large, almost uselessly so.
With a number in the actual job ad you know exactly where you're at: "SWE 2 @ 120k + 20% bonus + misc."