Why the density of water is highest at 4 degree celsius?

Why the density of water is highest at 4 degree celsius? The hydrogen bonds in water keep on forming and breaking.Due to hydrogen bonding, gaps are