Understanding Flatness in Generative Models: Its Role and Benefits