There are a lot of cyclical businesses that make money every year. It requires careful management. Factories can produce less than full capacity - but you better design for that. you can make money in the worst years without laying anyone off even - but it requires careful attention to details and not over hiring in good times as if they will never end.
Factories working at (significantly) less than full capacity gets a bit harder when you've got one of the most expensive machines on earth working in them, and production lines that'll be out of date in a couple of years
the normal way to do that is by hiring/firing to meet demand, but in the fab business, you have 10s of billions of dollars of capex with relatively little opex. if you're running at <90% capacity, you're losing money.