Yes, it is bad, at least according to the Homebrew FAQ:
Why does Homebrew say sudo is bad?
tl;dr Sudo is dangerous, and you installed TextMate.app without sudo anyway.
Homebrew refuses to work using sudo.
You should only ever sudo a tool you trust. Of course, you can trust Homebrew 😉 But do you trust the multi-megabyte Makefile that Homebrew runs? Developers often understand C++ far better than they understand make syntax. It’s too high a risk to sudo such stuff. It could modify (or upload) any files on your system. And indeed, we’ve seen some build scripts try to modify /usr even when the prefix was specified as something else entirely.
We use the macOS sandbox to stop this but this doesn’t work when run as the root user (which also has read and write access to almost everything on the system).
Did you chown root /Applications/TextMate.app? Probably not. So is it that important to chown root wget?
If you need to run Homebrew in a multi-user environment, consider creating a separate user account especially for use of Homebrew.
Moreover, Homebrew services are built and configured to run with user accounts, if you run them under the root account you risk to have configuration problems as you experienced. Also, as you should already known, running internet facing services, under a root account is a major security risk.