There are some privacy reasons for it.
A direct link from a search page will let websites see the search terms that users entered in to navigate there.
Google still knows everything so it doesn't protect you from them, but websites are more in the dark what users were doing before clicking the link.
Re:A URL Lengthener
by simcop2387 on Saturday May 15, 2021 @10:18AM
(#27165441)
And then Google aggregates that back to sides that use Google analytics so that they get both sides of the users
Plus, if it was done on OnClick there would definitely be an add-on to disable the tracking on all browsers.