There are some strong exchanges that did this voluntarily without being forced by law, such as Binance and KuCoin, when they were hacked, they compensated their users to preserve their reputation.
As for forcing this compensation on the platforms that were hacked, I think it is unfair and will be a very heavy burden on these services that were just hacked and lost a large part of their budget, which may lead to their bankruptcy and stop working.