God Regrets Four Things

The Talmud records four things that God explicitly “regrets”- but surely God need not “regret”. What is the meaning of this teaching?