This is yet another one of those situations where the use of a dying metaphor[0] hurts communication; you wall up a garden to protect what is inside from the harsh conditions outside: wind, cold, vermin... The implication is that the people in the garden are delicate flowers who would be destroyed by the conditions on The Greater Internet if they were to be exposed.
The antonym to the walled garden is the open garden or field, with hardy plants able to withstand and even thrive in the local atmosphere. They're still cultivated - weeded, fertilized - but there's no need to create a microclimate to just to accommodate them.
In this context, Facebook does make some effort toward walling off their gardens, but... As you note, Facebook's primary goal isn't protecting it's dominating - Facebook is just as happy to own major portions of the 'Net in pursuit of this goal, and more than a little reluctant to provide any real protection beyond what is absolutely necessary.
Beyond that... We all garden. From little personal websites and blogs, to big community gardens[1] like Wikipedia, Reddit, Stack Overflow, and even Hacker News. We plant, we harvest, we tend these plots, alone or together, but make little effort to isolate them from the larger world - indeed, we generally recognize that the strength of the Web is based on its interconnections, its inherent ability to draw together different sources of information.
[0]: https://www.orwell.ru/library/essays/politics/english/e_poli...
[1]: https://meta.stackexchange.com/questions/349513/feedback-for...