My own employment history in the past 10 years or so clearly demonstrates this is not the case. Companies I have worked on spent at least days, if not weeks before approaching me with a job offer (and no recruiters, direct contact from my future manager). A job they needed done, and a job they clearly understood I was an expert in.
I am am talking about senior-level jobs here, where the employee is hired because of his specific skill set and expertise in some particular domain. If the company does something that doesn't require any particular expertise, and no particular skill set, or if they don't know what they need, yeah... I don't want to be working there. Why would I? I would be selling myself short, and I would not advance in my technical career.
Companies can very well assess whether someone is interested in the job. They can't know without asking if someone is willing to tolerate the company, but they should be able to tell whether someone would likely be interested in a particular job. And if someone likes a job, most likely they won't mind the company, so it's worthwhile for the company to reach out.
Companies should also be able to assess with good reliability how qualified is someone for a particular job before contacting that person. If they can't, they either don't know what they need, or they are looking at the wrong person to hire.