Please show me which part of GDPR mandates that banner.
As additional homework, you can also lookup malicious compliance etc. Or even the sibling discussion on how Facebook wants you to apply for a permission to opt out of their tracking: https://news.ycombinator.com/item?id=35383925
The banners proliferated after GDPR was instituted.
Privacy should have been promoted through technological means, e.g the EU could have funded development of fingerprintless browser technologies, zero-knowledge proof based identity verification, etc, instead of through bureaucratic regimentation of private interaction.
As additional homework, you can also lookup malicious compliance etc. Or even the sibling discussion on how Facebook wants you to apply for a permission to opt out of their tracking: https://news.ycombinator.com/item?id=35383925