Actually, labor and raw materials are variable costs, and can be reduced in times of lower demand - a firm doesn't spend money on them if they don't use them. In the short run, if things got bad (i.e. lower demand and therefore lower market price) a firm could reasonably produce its product as long as at least the variable costs are covered by the selling price (fixed costs can't be done away with in the short run).
However, if the market price falls below variable costs, then the firm is better off shutting production in the short run, because by producing any output, it won't earn enough revenue to cover its variable costs, let alone any fixed cost (in essence they'd be losing money on every unit made). In this case, the loss incurred would be even greater than the cost of idling machinery. In short, the firm would basically take the least worst option, taking a smaller loss by producing zero output (thus eliminating variable costs) even though paying fixed cost.