I was just reading an author explain that among other things the Wagner Act outlawed yellow dog contracts. A yellow dog contract was a contract by which employees agreed not to join a union. Some employers would require such contracts with employees as a condition of employment. The author seemed to support the idea that Congress was right to have outlawed such contracts.
My sense is that there is nothing wrong with such contracts, and that Congress should not have been allowed to outlaw such contracts. It seems to me that we generally believe government has the power to prohibit actions that harm the person or property of others. This power is often referred to as the police power. So, I assume that members of Congress thought they were acting to prevent harm to others when they voted to outlaw yellow dog contracts.
I can see no harm to others with such contracts. A yellow dog contract would be a voluntary agreement by employer and employee. Given the voluntary nature of the agreement by both parties, I cannot understand saying either party was harmed. Yet, I would guess that those who supported prohibiting such contracts said they did so to protect the employee. But, by prohibiting the yellow dog contract Congress uses the coercive power of government to harm the employer who would otherwise not want to hire an employee who was a union member or who would become a union member after employment. On the one hand, there is no harm because the employment contract is voluntary for both employer and employee, and on the other hand government's coercion harms the employer. It seems that we should not want Congress to prohibit yellow dog contracts because its coercion acts to harm rather than to prevent harm.
A second reason for concern about this sort of Congressional prohibition is that generally government action to prohibit something, say theft, is thought to be an exercise of the police power. It seems to me generally accepted that the police power is a governmental power which was reserved to the states by the 10th Amendment. I don't think we should allow Congress to prohibit behavior in general because Congress is not supposed to have been granted the police power when the Constitutional was ratified.