God did not enjoy the flood. It greatly hurt him to do it, but he had to in order to save humanity. If humanity kept going on with their sin, we would have been screwed eventually. It was the best thing that could have happened, even if that was a horrible thing. And in the end, it resulted in a net positive for humanity.