Using unsafePerformIO safely?

It’s not quite clear to me why that can’t just be done in IO.