There exist job ads which have the explicit purpose of not finding a qualified candidate. It tends to be a result of things like H1-B visas, union contracts, and other frameworks which provide 'first dibs' on an opportunity to a subset of the global labour pool.