One of the explanations for structural unemployment is that, in some markets, wages are set above the equilibrium wage that would bring the supply of and demand for labor into balance. While it is true that labor unions, as well as minimum-wage laws and other regulations, contribute to this phenomenon, it is also the case that wages may be set above their equilibrium level on purpose in order to increase worker productivity.
This theory is referred to as the efficiency-wage theory, and there are a number of reasons that firms might find it profitable to behave in this way.
Reduced Worker Turnover
In most cases, workers don't arrive at a new job knowing everything that they need to know about the specific work involved, how to work effectively within the organization, and so on. Therefore, firms spend quite a bit of time and money getting new employees up to speed so that they can be fully productive at their jobs. In addition, firms spend a lot of money on recruiting and hiring new workers. Lower worker turnover leads to a reduction in the costs associated with recruiting, hiring, and training, so it can be worth it for firms to offer incentives that reduce turnover.
Paying workers more than the equilibrium wage for their labor market means that it is more difficult for workers to find equivalent pay if they choose to leave their current jobs. This, coupled with the fact that it's also less attractive to leave the labor force or switch industries when wages are higher, implies that higher than equilibrium (or alternative) wages give employees an incentive to stay with the company that is treating them well financially.
Increased Worker Quality
Higher than equilibrium wages can also result in increased quality of the workers that a company chooses to hire. Increased worker quality comes via two pathways: first, higher wages increase the overall quality and ability level of the pool of applicants for the job and help to win the most talented workers away from competitors. (Higher wages increase quality under the assumption that better quality workers have better outside opportunities that they choose instead.)
Second, better paid workers are able to take care of themselves better in terms of nutrition, sleep, stress, and so on. The benefits of better quality of life are often shared with employers since healthier employees are usually more productive than unhealthy employees. (Luckily, worker health is becoming less of a relevant issue for firms in developed countries.)
The last piece of the efficiency-wage theory is that workers exert more effort (and are hence more productive) when they are paid a higher wage. Again, this effect is realized in two different ways: first, if a worker has an unusually good deal with her current employer, then the downside of getting fired is larger than it would be if the worker could just pack up and get a roughly equivalent job somewhere else.
If the downside of getting fired if more severe, a rational worker will work harder to ensure that she doesn't get fired. Second, there are psychological reasons why a higher wage might induce effort since people tend to prefer working hard for people and organizations that acknowledge their worth and respond in kind.