Homebrew is a package manager with thousands of packages, not a file server. We maintain those packages, and knowing when they break (or can be deprecated due to lack of use) is critical to the project's sustenance.
Homebrew can detect a lot of things during normal maintenance work: there are extensive tests and checks during compilation and bottle building, for example.
However, we can't catch everything: Homebrew has millions of users, and those users have all kinds of different setups. We can't predict every possible host and software interaction; basic failure analytics help bridge the gap there.
I understand the desire for privacy, and the seriousness that comes with it!
I've linked Homebrew's analytics data and the source code that collects it elsewhere in this thread.
And, to be absolutely clear: it is perfectly fine for you to disable Homebrew's analytics. There are an infinite number of legitimate reasons for doing so, including the most basic one of "I just don't want to." My sole goal is to dispel the small number of inaccurate beliefs about what Homebrew collects, why we collect it, etc.
Which the software that I used to be employed maintaining has actually broken homebrew compiles when they've been installed at the same time (which I think I made better but I never got the PM who actually owned the product to spend the resources to properly fix).
A good example of how the configuration in the end user environment can affect package installation.