I can't understand why so many websites use an onclick handler on a button to redirect to websites.
It's not hard to even find something like
<a href="#" onclick="location.href='https://example.com';">click here</a>
The worst part is that it's not just random websites doing this, this can be found on most FAANG websites as well.
The worst part is that it's not just random websites doing this, this can be found on most FAANG websites as well.