For one, it takes a certain level of competence to be able to differentiate between good and bad work. If your boss can't tell the difference between the two, workers will be rewarded/punished/promoted/fired based on some other metrics, which are likely to be unfair or even arbitrary.
Another, is that bosses and managers are responsible for providing guidance. If you have two ways to do something and aren't sure which is best, it's natural to go to your manager for advice. If you get the feeling that the advice you get is worthless (or even harmful), then you'll feel lost and unsupported.
And finally, in many organizations, the boss sets priorities. If he doesn't understand the work, he is likely to have unrealistic or actively harmful expectations. And you'll feel like you're wasting your time.
All of these things are terrible for morale.