There is a tradeoff between these two things, particularly if companies are not punished severely in cases where unsafe working conditions actually end up harming workers.
Companies need to have the lowest possible costs. Often, making a workplace safe costs money. There may be special equipment needed or it may be necessary to avoid pushing the workers so hard that they get tired and careless. In each case, costs go up. This means that there is a trade off between safety and costs.
However, if there are governmental policies in place to punish firms whose workers get hurt, this trade off goes away. If workers who are hurt can recover substantial damages from their employers, it comes to be in the employer's interest to create a safe workplace. In such a situation, there is no longer a tension between safety and the desire for lower costs.