Two problems result from this. The solution to both requires legal recognition of the property rights of human beings over our attention.
First, advertising imposes costs on individuals without permission or compensation. It extracts our precious attention and emits toxic byproducts, such as the sale of our personal information to dodgy third parties.
Second, you may have noticed that the world's fisheries are not in great shape. They are a standard example for explaining the theoretical concept of a tragedy of the commons, where rational maximising behaviour by individual harvesters leads to the unsustainable overexploitation of a resource. At present our attention is the object of a destructive free for all that undermines capitalism as a whole.