Why wouldn't it be legal?
You are using their product and they put out a notification on it asking if you want to use one of their products.
Why would that be illegal!?
Like I understand people not liking it, but illegal?
I am pretty sure they are insinuating that it is antitrust violation. It probably is but our current governance seems unwilling to do anything about anti-competitive practices.
What is illegal? Asking you if you want to change your default search engine? That doesn't sound illegal to me so I wonder what law is causing it to be illegal.