(1) Is to help boost stocks by convincing investors the company is growing, even though it's not actually hiring anybody. (2) To claim they searched for U.S. candidates, could not find any, therefore they need to import cheap labor from China or India. Whichever one it is, it was obvious I wasn't getting the job even though I'm only 30 minutes away from the factory.
I once worked for a company that advertised a job that wasn't actually open. Basically, the person in that position was foriegn (Italian) and had just applied for full residency in the U.S. Her employer wanted to keep her on, of course. But apparently they had to prove to the INS that she was most fit for the job, so they had to advertise the job. Not sure what corporate machinations were involved, but they did keep her (and she got residency).
At another place, they had received such a huge number of applications for a specific job, that they decided not to accept any more.