Does the command `reboot` hurt a Mac computer?

It’s not like pulling the power plug because it sends various signals like SIGTERM which closes services and daemons. User applications with unsaved data may get lost, but they’re not arbitrarily closed as if the system lost power.

From the man page (man reboot)

The halt and reboot utilities flush the file system cache to disk, send all running processes a SIGTERM (and subsequently a SIGKILL) and, respectively, halt or restart the system.

So, running reboot is perfectly safe to the system.