I think it was just that the cleaving ritual needed a ton of magic, and the hat was needed to collect it all.
As for why the hat was made… Perhaps Merlin intended to use it to remove the dark magic from Nimue’s heart like was done with Rumple. Problem is that unlike Excalibur, the hat can’t actually destroy the darkness nor even store it, so it’ll go around causing havoc unless tethered to a human again.