Google would have a walled garden if they could afford to lose the users and manufacturers that would revolt against it.
They lose the most if the internet balkanizes.
By balkanising the internet they can have a monopoly over offering ads to certain target groups that fall within their walled garden.
Anyway, Google works hard to make the open web competitive with all the walled gardens around. When they do that they put up some fences to make the experience a bit more like walled gardens, but the open web is still just a few seconds and a click away.
That's why Google instead reshapes the web as Google sees fit.
> Anyway, Google works hard to make the open web competitive with all the walled gardens around
No. It subsumes the web and replaces it with all things Google. It dominates all web-related standards bodies, pushes through half-baked Chrome-only APIs as "standards" and then presents them as fait accompli through Google-controlled properties like web.dev.