If you are at the beach with sandy soil or pure sand, It is one of the few plants that will grow.
It grows to a good height...And when used properly, it protects non-beach plants plant in front of it by acting as a wind break.
Wind kills more landscaping at the beach than salt or sand does. Wind does not kill this plant. That is key to it acting like a barrier to the elements.
If you are trying to create a dune or stabilize a cliff...it does that well too.
Beyond that, yes, it is a weed that wants to spread and attracts a ton of bees during its bloom period (which is short).
Privet, Olive and Cypress all do well in the sand...but if you are open to the water...You better have a wall in front of them or this plant...if not the wind will kill the side of the plant facing the water