I fully agree with Buildersmate, in that an employer is under no obligation to advertise a vacancy. He can simply give the job to whomever he pleases. (the only exception would be where there was a formal agreement, regarding staff recruitment, with one or more unions).
However I would point out that it would sometimes be 'good practice' not to advertise a job. I applied for a head of department teaching job in Norfolk. Norfolk LEA had to pay for my travel (from Sheffield) and for my overnight accommodation. Sheffield LEA had to pay for a supply teacher to take my classes. There were three other external candidates, meaning that a large amount of public money had to be spent on paying their expenses and providing supply staff to cover their lessons.
As soon as we got to the school where the interviews were being held, it was made abundantly clear to us that we were only there to 'make up the numbers' (because the big teaching unions had insisted that the job had to be widely advertised). The second-in-department had been doing the job for nearly a year, since his boss had died suddenly. The head teacher (and the governors) were clearly of the opinion that he was 'a breath of fresh air' and 'the best thing since sliced bread'. He (unsurprisingly) got the job. I'm sure that his employers made the right decision (so there were certainly no 'sour grapes' from me) but it still seems absolute madness that the school had to waste everyone's time, and a lot of public money, when they had an excellent candidate already doing the job.
Chris