You're conflating two completely different things here (posting job listings and who decides on which candidate to hire)
WRT to hiring, in my experience, the hiring manager for an IC position was always first among equals in making the final candidate selection. Other people, based on their position in the company, might get to say no, but I was the only person who got to say yes. This was slightly different for hiring non-ICs at the company I worked for - in that case, the functional leader had to agree with the hiring manager, but it was still the hiring manager who ultimately decided whether or not to advance their candidate to the final round with the functional leader.
As for posting job reqs, it ultimately required much higher than director-level approval to post any job req. It typically required functional leader approval and HR/finance approval to get done.
Generally, I and other managers would make the case for why we needed additional headcount to our managers (usually directly to our director and our VP) and the VPs would make the case to our SVP as to why their particular team should get the headcount they wanted. Then, the VPs would figure out where they wanted to allocate their headcount, then the directors would do the same, then the managers would figure out (if they didn't get all of the headcount they wanted) which positions they wanted to fill, then the whole process would go in reverse where we would make the case to our directors why we wanted to fill x position instead of y position, and so on and so forth.
> but at a lot of companies the line managers have zero say in whether it happens or not
I don't doubt that. But, it is a sign of an unhealthy leadership culture and an unhealthy relationship between managers and their directors.