There's a lot left to learn about them but while they seem to occur naturally, there is some evidence that man is also having an effect here too. Runoff from agricultural areas puts various nutrients in the water (thanks to pesticides etc) and this MAY lead to increased chance of algal blooms. With fish farming massively on the rise around the world, the fish food left in the water may also add to the problem.
Seems that there is not always any risk in swimming in the bloom, but some do contain toxins so I guess the gov is just being careful.