Why does this need to be built on the beach?
So the (eastward) flight path isn't over populated land. Rapid disassembly and all that.
Presumably so rockets can get out over water as quickly as possible in case they fail.
it is to ensure that nothing fall on people's heads
It doesn't. It doesn't even need to be built, since the Stennis Space Center is already there and already has an excluson zone. This is a vanity project.
Because as China has shown, people get angry when you drop hundreds of tons of steel and propellant on people.
Rockets sometimes fail. SpaceX has one of the lowest failure rates in the industry, but that's still ~0.5%. When they fail near launch, they cause humongous explosions. Because of this, anyone with even a tiny bit of care for people launches over the ocean, so that when it goes oops, it only harms some fish.
The existing launch sites SpaceX uses are good for launching into prograde (Starbase, TX and Cape Canaveral, FL) and retrograde (Vandenberg SFB, CA) orbits, but they are all either unable or kind of marginal for launching into polar/very highly inclined orbits. (Starbase, TX cannot do it at all, Vandenberg SFB, CA has limitations on when you can launch, and Cape Canaveral, FL needs to fly a dogleg which reduces performance.)
Part of their plans for the space datacenters involve launching a lot of mass into sun-synchronous (which is very highly inclined) orbits. For that, they need a launch site with the ocean either to the north or to the south.