More than 40 beaches are closed across Massachusetts on Sunday — here's why.