Cookie banners were a result of an EU ePrivacy "cookie law" from 2002, 16yrs prior to GDPR and before fingerprinting.
The current breed of cookie banners is the industry's response to GDPR