Proof of stake replaces the ongoing expense of electricity with a deposit at risk. That substitution only works if the deposit can actually be taken, which is what slashing does.
Work imposes cost automatically
A proof of work miner spends energy before producing anything, so an attack costs real money whether or not it succeeds.
A validator signing a message spends effectively nothing. Signing two conflicting messages costs no more than signing one.
Without an explicit penalty, supporting several competing histories at once would be free, and nothing would push validators toward a single chain.
Signatures make misbehaviour provable
Every validator vote is signed, so a validator that endorses two conflicting blocks at the same height has produced two contradictory documents bearing its own signature.
Anyone can submit those signatures to the chain as evidence, and the protocol can verify the contradiction without any judgement about intent.
This is the crucial difference from proof of work, where building on a competing branch is indistinguishable from ordinary honest behaviour.
The penalty scales with how many did it
A single validator equivocating cannot reorganise anything and is probably suffering a configuration error rather than attacking.
Designs therefore scale the penalty with how much stake committed the same offence in the same window, so isolated mistakes cost little and coordinated action costs a great deal.
This also discourages running identical setups across a large share of the network, since correlated failures are penalised as though they were coordinated.
Downtime is treated as a separate matter
A validator that is merely offline harms the network by withholding participation, but it is not attacking and cannot cause a conflicting history.
Such validators face small ongoing deductions rather than slashing, calibrated so that a validator online most of the time still earns.
During prolonged failure to finalise, those deductions increase, gradually reducing the stake of absent validators until the remaining active set can finalise again.
Operators build around the risk
Because equivocation is punished and downtime is not, the safe engineering choice is to fail closed: a validator unsure of its state should stop signing.
Redundant setups intended to improve uptime are the classic trap, since two instances holding the same key can sign conflicting messages during a failover.
Slashing protection databases that record what a key has already signed exist precisely to prevent that, and they are the component operators guard most carefully.