Clearly some exchanges weren't following that rule!
Waiting for a certain number of blocks is only to reduce the probability of natural fork eliminating the transaction (by eventually outgrowing the fork you included your transaction into) to infetesimally small.
4000 blocks is also, I think, extremely deep into the chain. As I recall, bitcoin exchanges default to like 6 blocks before confirming?
At least, this was from my readings into bitcoin -- not sure if ethereum changes that equation, but im fairly positive it doesnt.
If you are verifying a transaction of a given value, you would be stupid not to wait the dollar value of the hashpower required to reverse the transaction. If you run a service and someone could sign up for multiple accounts, you should take that into account too...
Detecting the attack or vulnerability to it is easy in smooth difficulty increasing proof of work systems by looking for spikes in difficulty... But waiting for too long is not acceptable.
This attack was against Ethereum Classic, which has a block time of 13 seconds. 4000 blocks ≈ 14 hours.